You can enable Java 5 compiler settings for your JSP pages in Tomcat by navigating to your <tomcat 5 install dir>\conf directory and then editing the web.xml file.
From there, scroll down to around line 212 or so and you will see the following servlet definition:
| Code: |
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>fork</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>xpoweredBy</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
|
You can add a new init-param with the name compilerSourceVM and value of 1.5 to turn on the Java 5 features. The new init-param would look something like this:
| Code: |
<init-param>
<param-name>compilerSourceVM</param-name>
<param-value>1.5</param-value>
</init-param>
|
This feature in the default web.xml file that ships with Tomcat is described in the comment above this snippet of code that explains all the optional init-params you can pass to Tomcat on startup. Valid values are 1.4 and 1.5. |