Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 39417 invoked from network); 19 Oct 2004 15:00:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 19 Oct 2004 15:00:25 -0000 Received: (qmail 84445 invoked by uid 500); 19 Oct 2004 15:00:07 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 84378 invoked by uid 500); 19 Oct 2004 15:00:06 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 84363 invoked by uid 99); 19 Oct 2004 15:00:06 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [12.11.148.32] (HELO exrelay.ptc.com) (12.11.148.32) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 19 Oct 2004 08:00:06 -0700 Received: from hq-exfe1.ptcnet.ptc.com (132.253.201.60) by exrelay.ptc.com with ESMTP; 19 Oct 2004 11:00:23 -0400 X-Ironport-AV: i="3.85,152,1094443200"; d="scan'208"; a="2445929:sNHT29100700" Received: from [132.253.10.127] ([132.253.10.127]) by HQ-EXFE1.ptcnet.ptc.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 19 Oct 2004 11:00:00 -0400 Message-ID: <41752BEF.5090807@ptc.com> Date: Tue, 19 Oct 2004 09:59:59 -0500 From: Jess Holle User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tomcat Developers List CC: "Shapira, Yoav" Subject: Re: 5.0.29 JSP compilation fails when using JDK 1.5.0 References: <9C5166762F311146951505C6790A9CF80229C32E@US-VS1.corp.mpi.com> <416EB794.8000501@ptc.com> <41742BB5.7040102@ptc.com> In-Reply-To: <41742BB5.7040102@ptc.com> Content-Type: multipart/mixed; boundary="------------030702060208030108050709" X-OriginalArrivalTime: 19 Oct 2004 15:00:00.0277 (UTC) FILETIME=[4E3D5C50:01C4B5EC] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --------------030702060208030108050709 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I accidentally got Windows end-of-line sequences in the last set of patches. Here's a better set. -- Jess Holle Jess Holle wrote: > Okay, I now (belatedly) understand the problem. > > The issue is that by default Jaspper is setting the target release to > 1.3 but leaving the source release unspecified -- resulting in the JDK > 1.5 javac default source release, 1.5 -- and javac won't allow this > mixture. > > I am attaching a set of patches that (1) defaults the source release > to 1.3 as well and (2) allows this to be controlled in a completely > independent and analogous manner to target release. > > I would appreciate seeing this in 5.0.30 :-) > > -- > Jess Holle --------------030702060208030108050709 Content-Type: text/plain; name="Options.java.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Options.java.patch" --- Options.java-5.0.29 2004-10-19 09:56:58.000000000 -0500 +++ Options.java 2004-10-19 09:57:00.000000000 -0500 @@ -117,11 +117,16 @@ public String getCompiler(); /** - * Compiler target VM, e.g. 1.1,1.2,1.3, or 1.4. + * Compiler target VM, e.g. 1.1, 1.2, 1.3, 1.4, or 1.5. */ public String getCompilerTargetVM(); /** + * Compiler source VM, e.g. 1.3, 1.4, or 1.5. + */ + public String getCompilerSourceVM(); + + /** * The cache for the location of the TLD's * for the various tag libraries 'exposed' * by the web application. --------------030702060208030108050709 Content-Type: text/plain; name="Compiler.java.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Compiler.java.patch" --- Compiler.java-5.0.29 2004-10-19 09:56:54.000000000 -0500 +++ Compiler.java 2004-10-19 09:57:08.000000000 -0500 @@ -386,6 +386,11 @@ info.append(" compilerTargetVM=" + options.getCompilerTargetVM() + "\n"); } + if (options.getCompilerSourceVM() != null) { + javac.setSource(options.getCompilerSourceVM()); + info.append(" compilerSourceVM=" + options.getCompilerSourceVM() + "\n"); + } + // Build includes path PatternSet.NameEntry includes = javac.createInclude(); --------------030702060208030108050709 Content-Type: text/plain; name="EmbeddedServletOptions.java.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="EmbeddedServletOptions.java.patch" --- EmbeddedServletOptions.java-5.0.29 2004-10-19 09:57:12.000000000 -0500 +++ EmbeddedServletOptions.java 2004-10-19 09:57:06.000000000 -0500 @@ -144,6 +144,11 @@ private String compilerTargetVM = "1.3"; /** + * The compiler source VM ("1.3" by default). + */ + private String compilerSourceVM = "1.3"; + + /** * Cache for the TLD locations */ private TldLocationsCache tldLocationsCache = null; @@ -303,6 +308,14 @@ return compilerTargetVM; } + /** + * @see Options#getCompilerSourceVM + */ + public String getCompilerSourceVM() + { + return compilerSourceVM; + } + public boolean getErrorOnUseBeanInvalidClassAttribute() { return errorOnUseBeanInvalidClassAttribute; } @@ -571,6 +584,11 @@ this.compilerTargetVM = compilerTargetVM; } + String compilerSourceVM = config.getInitParameter("compilerSourceVM"); + if(compilerSourceVM != null) { + this.compilerSourceVM = compilerSourceVM; + } + String javaEncoding = config.getInitParameter("javaEncoding"); if (javaEncoding != null) { this.javaEncoding = javaEncoding; --------------030702060208030108050709 Content-Type: text/plain; name="JspC.java.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="JspC.java.patch" --- JspC.java-5.0.29 2004-10-19 09:57:10.000000000 -0500 +++ JspC.java 2004-10-19 09:57:02.000000000 -0500 @@ -98,6 +98,8 @@ private static final String SWITCH_CLASS_NAME = "-c"; private static final String SWITCH_FULL_STOP = "--"; private static final String SWITCH_COMPILE = "-compile"; + private static final String SWITCH_SOURCE = "-source"; + private static final String SWITCH_TARGET = "-target"; private static final String SWITCH_URI_BASE = "-uribase"; private static final String SWITCH_URI_ROOT = "-uriroot"; private static final String SWITCH_FILE_WEBAPP = "-webapp"; @@ -145,6 +147,7 @@ private String compiler = null; private String compilerTargetVM = "1.3"; + private String compilerSourceVM = "1.3"; private boolean classDebugInfo = true; private Vector extensions; @@ -276,6 +279,10 @@ } } else if (tok.equals(SWITCH_ENCODING)) { setJavaEncoding(nextArg()); + } else if (tok.equals(SWITCH_SOURCE)) { + setCompilerSourceVM(nextArg()); + } else if (tok.equals(SWITCH_TARGET)) { + setCompilerTargetVM(nextArg()); } else { if (tok.startsWith("-")) { throw new JasperException("Unrecognized option: " + tok + @@ -479,6 +486,22 @@ compilerTargetVM = vm; } + /** + * @see Options#getCompilerSourceVM. + */ + public String getCompilerSourceVM() + { + return compilerSourceVM; + } + + /** + * @see Options#getCompilerSourceVM. + */ + public void setCompilerSourceVM( String vm ) + { + compilerSourceVM = vm; + } + public TldLocationsCache getTldLocationsCache() { return tldLocationsCache; } @@ -1156,5 +1179,4 @@ // pass straight through } } - } --------------030702060208030108050709 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org --------------030702060208030108050709--