From: kkolinko Date: Wed, 24 Jun 2009 11:17:24 +0000 (+0000) Subject: Updated Jasper runtime and JspC to use "1.6" as the values for compilerSourceVM,... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=92175f4b6fa934d8f4e2945de6d1ba407d1cf6ba;p=tomcat7.0 Updated Jasper runtime and JspC to use "1.6" as the values for compilerSourceVM, compilerTargetVM options by default, 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 --- diff --git a/conf/web.xml b/conf/web.xml index a51cb2949..c79163127 100644 --- a/conf/web.xml +++ b/conf/web.xml @@ -125,9 +125,9 @@ - + - + diff --git a/java/org/apache/jasper/EmbeddedServletOptions.java b/java/org/apache/jasper/EmbeddedServletOptions.java index f349557a5..2f7e9b171 100644 --- a/java/org/apache/jasper/EmbeddedServletOptions.java +++ b/java/org/apache/jasper/EmbeddedServletOptions.java @@ -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 enumeration=config.getInitParameterNames(); while( enumeration.hasMoreElements() ) { String k=enumeration.nextElement(); diff --git a/java/org/apache/jasper/JspC.java b/java/org/apache/jasper/JspC.java index a3f7d406d..d664ae764 100644 --- a/java/org/apache/jasper/JspC.java +++ b/java/org/apache/jasper/JspC.java @@ -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; diff --git a/java/org/apache/jasper/resources/LocalStrings.properties b/java/org/apache/jasper/resources/LocalStrings.properties index f5ab6ffe4..abf4acb4b 100644 --- a/java/org/apache/jasper/resources/LocalStrings.properties +++ b/java/org/apache/jasper/resources/LocalStrings.properties @@ -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 Set the encoding charset for Java classes (default UTF-8)\n\ -\ -source Set the -source argument to the compiler (default 1.4)\n\ -\ -target Set the -target argument to the compiler (default 1.4)\n\ +\ -source Set the -source argument to the compiler (default 1.6)\n\ +\ -target Set the -target argument to the compiler (default 1.6)\n\ jspc.webxml.header=\n\ \n\ diff --git a/java/org/apache/jasper/resources/LocalStrings_es.properties b/java/org/apache/jasper/resources/LocalStrings_es.properties index 0cf9618a3..508eda8d3 100644 --- a/java/org/apache/jasper/resources/LocalStrings_es.properties +++ b/java/org/apache/jasper/resources/LocalStrings_es.properties @@ -256,8 +256,8 @@ jspc.usage = Uso\: jspc [--] \n\ \ -xpoweredBy A\u00F1ade cabecera de respuesta X-Powered-By\n\ \ -trimSpaces Trim spaces in template text between actions, directives\n\ \ -javaEncoding Set the encoding charset for Java classes (default UTF-8)\n\ - \ -source Set the -source argument to the compiler (default 1.4)\n\ - \ -target Set the -target argument to the compiler (default 1.4)\n + \ -source Set the -source argument to the compiler (default 1.6)\n\ + \ -target Set the -target argument to the compiler (default 1.6)\n jspc.webxml.header = \n\ \n\ <\!DOCTYPE web-app\n\ diff --git a/java/org/apache/jasper/resources/LocalStrings_fr.properties b/java/org/apache/jasper/resources/LocalStrings_fr.properties index d175ea818..75d4f5c47 100644 --- a/java/org/apache/jasper/resources/LocalStrings_fr.properties +++ b/java/org/apache/jasper/resources/LocalStrings_fr.properties @@ -198,8 +198,8 @@ o\u00f9 les options comprennet:\n\ \ -sax2 Le nom de classe du Driver SAX 2.0 \u00e0 utiliser\n\ \ -trimSpaces Trim spaces in template text between actions, directives\n\ \ -javaEncoding Set the encoding charset for Java classes (default UTF-8)\n\ -\ -source Set the -source argument to the compiler (default 1.4)\n\ -\ -target Set the -target argument to the compiler (default 1.4)\n\ +\ -source Set the -source argument to the compiler (default 1.6)\n\ +\ -target Set the -target argument to the compiler (default 1.6)\n\ jspc.webxml.header=\n\ \n\ diff --git a/java/org/apache/jasper/resources/LocalStrings_ja.properties b/java/org/apache/jasper/resources/LocalStrings_ja.properties index cfe536c00..75305afaa 100644 --- a/java/org/apache/jasper/resources/LocalStrings_ja.properties +++ b/java/org/apache/jasper/resources/LocalStrings_ja.properties @@ -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 Set the encoding charset for Java classes (default UTF-8)\n\ -\ -source Set the -source argument to the compiler (default 1.4)\n\ -\ -target Set the -target argument to the compiler (default 1.4)\n\ +\ -source Set the -source argument to the compiler (default 1.6)\n\ +\ -target Set the -target argument to the compiler (default 1.6)\n\ jspc.webxml.header=\n\ \n\ diff --git a/webapps/docs/jasper-howto.xml b/webapps/docs/jasper-howto.xml index ec39da103..47587c4c8 100644 --- a/webapps/docs/jasper-howto.xml +++ b/webapps/docs/jasper-howto.xml @@ -107,10 +107,10 @@ then the default Eclipse JDT Java compiler will be used instead of using Ant. No default value.
  • compilerSourceVM - What JDK version are the source files -compatible with? (Default value: 1.5)
  • +compatible with? (Default value: 1.6)
  • compilerTargetVM - What JDK version are the generated files -compatible with? (Default value: 1.5)
  • +compatible with? (Default value: 1.6)
  • development - 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 addWebXmlMappings for automatic merge the ${webapp.path}/WEB-INF/generated_web.xml with the current web application deployment descriptor at -${webapp.path}/WEB-INF/web.xml. When you want to use Java 5 +${webapp.path}/WEB-INF/web.xml. When you want to use Java 6 features inside your jsp's, add the following javac compiler task attributes: -source="1.5" target="1.5". For live +source="1.6" target="1.6". For live applications you can also compile with optimize="on" and without debug info debug="off".