Updated Jasper runtime and JspC to use "1.6" as the values for compilerSourceVM,...
authorkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 24 Jun 2009 11:17:24 +0000 (11:17 +0000)
committerkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 24 Jun 2009 11:17:24 +0000 (11:17 +0000)
as Tomcat 7 runs on JRE 1.6+

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@787978 13f79535-47bb-0310-9956-ffa450edef68

conf/web.xml
java/org/apache/jasper/EmbeddedServletOptions.java
java/org/apache/jasper/JspC.java
java/org/apache/jasper/resources/LocalStrings.properties
java/org/apache/jasper/resources/LocalStrings_es.properties
java/org/apache/jasper/resources/LocalStrings_fr.properties
java/org/apache/jasper/resources/LocalStrings_ja.properties
webapps/docs/jasper-howto.xml

index a51cb29..c791631 100644 (file)
   <!--                       pages.  See the jasper documentation for more  -->
   <!--                       information.                                   -->
   <!--                                                                      -->
-  <!--   compilerSourceVM    Compiler source VM. [1.5]                      -->
+  <!--   compilerSourceVM    Compiler source VM. [1.6]                      -->
   <!--                                                                      -->
-  <!--   compilerTargetVM    Compiler target VM. [1.5]                      -->  
+  <!--   compilerTargetVM    Compiler target VM. [1.6]                      -->
   <!--                                                                      -->
   <!--   development         Is Jasper used in development mode? If true,   -->
   <!--                       the frequency at which JSPs are checked for    -->
index f349557..2f7e9b1 100644 (file)
@@ -131,12 +131,12 @@ public final class EmbeddedServletOptions implements Options {
     /**
      * Compiler target VM.
      */
-    private String compilerTargetVM = "1.5";
+    private String compilerTargetVM = "1.6";
     
     /**
      * The compiler source VM.
      */
-    private String compilerSourceVM = "1.5";
+    private String compilerSourceVM = "1.6";
     
     /**
      * The compiler class name.
@@ -377,18 +377,6 @@ public final class EmbeddedServletOptions implements Options {
     public EmbeddedServletOptions(ServletConfig config,
             ServletContext context) {
         
-        // JVM version numbers
-        // - not needed, because this version of Tomcat requires at least JDK 1.5
-        // try {
-        //    if (Float.parseFloat(System.getProperty("java.specification.version")) > 1.4) {
-        //        compilerSourceVM = compilerTargetVM = "1.5";
-        //    } else {
-        //        compilerSourceVM = compilerTargetVM = "1.4";
-        //    }
-        // } catch (NumberFormatException e) {
-        //    // Ignore
-        // }
-        
         Enumeration<String> enumeration=config.getInitParameterNames();
         while( enumeration.hasMoreElements() ) {
             String k=enumeration.nextElement();
index a3f7d40..d664ae7 100644 (file)
@@ -164,8 +164,8 @@ public class JspC implements Options {
 
     protected String compiler = null;
 
-    protected String compilerTargetVM = "1.4";
-    protected String compilerSourceVM = "1.4";
+    protected String compilerTargetVM = "1.6";
+    protected String compilerSourceVM = "1.6";
 
     protected boolean classDebugInfo = true;
 
index f5ab6ff..abf4acb 100644 (file)
@@ -256,8 +256,8 @@ where options include:\n\
 \    -xpoweredBy        Add X-Powered-By response header\n\
 \    -trimSpaces        Trim spaces in template text between actions, directives\n\
 \    -javaEncoding <enc> Set the encoding charset for Java classes (default UTF-8)\n\
-\    -source <version>   Set the -source argument to the compiler (default 1.4)\n\
-\    -target <version>   Set the -target argument to the compiler (default 1.4)\n\
+\    -source <version>   Set the -source argument to the compiler (default 1.6)\n\
+\    -target <version>   Set the -target argument to the compiler (default 1.6)\n\
 
 jspc.webxml.header=<?xml version="1.0" encoding="ISO-8859-1"?>\n\
 \n\
index 0cf9618..508eda8 100644 (file)
@@ -256,8 +256,8 @@ jspc.usage = Uso\: jspc <opciones> [--] <Archivos JSP>\n\
        \    -xpoweredBy        A\u00F1ade cabecera de respuesta  X-Powered-By\n\
        \    -trimSpaces        Trim spaces in template text between actions, directives\n\
        \    -javaEncoding <enc> Set the encoding charset for Java classes (default UTF-8)\n\
-       \    -source <version>   Set the -source argument to the compiler (default 1.4)\n\
-       \    -target <version>   Set the -target argument to the compiler (default 1.4)\n
+       \    -source <version>   Set the -source argument to the compiler (default 1.6)\n\
+       \    -target <version>   Set the -target argument to the compiler (default 1.6)\n
 jspc.webxml.header = <?xml version\="1.0" encoding\="ISO-8859-1"?>\n\
        \n\
        <\!DOCTYPE web-app\n\
index d175ea8..75d4f5c 100644 (file)
@@ -198,8 +198,8 @@ o\u00f9 les options comprennet:\n\
 \    -sax2 <driverclassname>  Le nom de classe du Driver SAX 2.0 \u00e0 utiliser\n\
 \    -trimSpaces        Trim spaces in template text between actions, directives\n\
 \    -javaEncoding <enc> Set the encoding charset for Java classes (default UTF-8)\n\
-\    -source <version>   Set the -source argument to the compiler (default 1.4)\n\
-\    -target <version>   Set the -target argument to the compiler (default 1.4)\n\
+\    -source <version>   Set the -source argument to the compiler (default 1.6)\n\
+\    -target <version>   Set the -target argument to the compiler (default 1.6)\n\
 
 jspc.webxml.header=<?xml version="1.0" encoding="ISO-8859-1"?>\n\
 \n\
index cfe536c..75305af 100644 (file)
@@ -241,8 +241,8 @@ JSP\u30d5\u30a1\u30a4\u30eb\u306e\u5834\u6240\u306f\u6b21\u306e\u30aa\u30d7\u30b
 \    -trimSpaces        \u30a2\u30af\u30b7\u30e7\u30f3\u3084\u6307\u793a\u5b50\u306e\u9593\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30c6\u30ad\u30b9\u30c8\u4e2d\u306e\u30b9\u30da\u30fc\u30b9\u3092\u524a\u9664\n\
 \    -trimSpaces        Trim spaces in template text between actions, directives\n\
 \    -javaEncoding <enc> Set the encoding charset for Java classes (default UTF-8)\n\
-\    -source <version>   Set the -source argument to the compiler (default 1.4)\n\
-\    -target <version>   Set the -target argument to the compiler (default 1.4)\n\
+\    -source <version>   Set the -source argument to the compiler (default 1.6)\n\
+\    -target <version>   Set the -target argument to the compiler (default 1.6)\n\
 
 jspc.webxml.header=<?xml version="1.0" encoding="ISO-8859-1"?>\n\
 \n\
index ec39da1..47587c4 100644 (file)
@@ -107,10 +107,10 @@ then the default Eclipse JDT Java compiler will be used instead of using Ant.
 No default value.</li>
 
 <li><strong>compilerSourceVM</strong> - What JDK version are the source files
-compatible with? (Default value: <code>1.5</code>)</li>
+compatible with? (Default value: <code>1.6</code>)</li>
 
 <li><strong>compilerTargetVM</strong> - What JDK version are the generated files
-compatible with? (Default value: <code>1.5</code>)</li>
+compatible with? (Default value: <code>1.6</code>)</li>
 
 <li><strong>development</strong> - Is Jasper used in development mode? If true,
 the frequency at which JSPs are checked for modification may be specified via
@@ -318,9 +318,9 @@ are automatically compiled as part of the build process.
 At the jasper2 task you can use the option <code>addWebXmlMappings</code> for 
 automatic merge the <code>${webapp.path}/WEB-INF/generated_web.xml</code>
 with the current web application deployment descriptor at
-<code>${webapp.path}/WEB-INF/web.xml</code>. When you want to use Java 5
+<code>${webapp.path}/WEB-INF/web.xml</code>. When you want to use Java 6
 features inside your jsp's, add the following javac compiler task attributes:
-<code>source=&quot;1.5&quot; target=&quot;1.5&quot;</code>. For live
+<code>source=&quot;1.6&quot; target=&quot;1.6&quot;</code>. For live
 applications you can also compile with <code>optimize=&quot;on&quot;</code> and
 without debug info <code>debug=&quot;off&quot;</code>.
 </p>