Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tomcat: Compiling JSPs with JDK 1.5



I want my JSP pages on Tomcat 5.5.7 to be compiled with JDK 1.5.  Presently, they only compile with 1.4.

I looked up this documenation on the subject, and this is what I found:

http://blog.taragana.com/index.php/archive/how-to-run-javac-15-or-beyond-compiler-for-jsp-compilation-in-tomcat-55-with-generics-enabled-and-other-15-only-features/

-------
Problem

Tomcat 5.5 (unlike Tomcat 5.0 and versions below) comes with Eclipse JDT compiler enabled by default for JSP compilation. JDT compiler is not jdk 1.5 compliant as of now.

Solution
To just use the javac 1.5 compiler with Java 1.4 source code compliant JSP pages (you cannot use generics or autoboxing in scripted jsp code and other Java 1.51.4 compliant target classes generated, you have to add tools.jar from your %JAVA_HOME%\lib directory to %TOMCAT_HOME%\common\lib.
Then replace the jasper-compiler-jdt.jar with ant.jar in %TOMCAT_HOME%\common\lib. Make sure you have downloaded the latest version of Ant.
features) and Java

To enable 1.5 features in your JSP files (like generics and autoboxing for example) you need to additionally modify %TOMCAT_HOME%\conf\web.xml file.

-------

The problem is, I can't find tools.jar.  Also, even after googling, I can't find the equivalent of tools.jar.

These are the jars I found under 1.5:

./Versions/1.5.0/Classes/charsets.jar
./Versions/1.5.0/Classes/classes.jar
./Versions/1.5.0/Classes/dt.jar
./Versions/1.5.0/Classes/jce.jar
./Versions/1.5.0/Classes/jconsole.jar
./Versions/1.5.0/Classes/jsse.jar
./Versions/1.5.0/Classes/laf.jar
./Versions/1.5.0/Classes/ui.jar
./Versions/1.5.0/Home/lib/deploy.jar
./Versions/1.5.0/Home/lib/dt.jar
./Versions/1.5.0/Home/lib/ext/apple_provider.jar
./Versions/1.5.0/Home/lib/ext/localedata.jar
./Versions/1.5.0/Home/lib/ext/sunjce_provider.jar
./Versions/1.5.0/Home/lib/im/indicim.jar
./Versions/1.5.0/Home/lib/im/thaiim.jar
./Versions/1.5.0/Home/lib/jce.jar
./Versions/1.5.0/Home/lib/plugin.jar
./Versions/1.5.0/Home/lib/security/local_policy.jar
./Versions/1.5.0/Home/lib/security/US_export_policy.jar


Any ideas?

Thanks,
Luke
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.