DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31269>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31269

Configuration for Java 1.5 is too hairy

           Summary: Configuration for Java 1.5 is too hairy
           Product: Tomcat 5
           Version: Nightly Build
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Jasper
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


In order to set up Tomcat 5.5.2 alpha so that it would compile JSPs that
contained Java code with Java 1.5 features, I had to do the following:

1. Specify the Ant compiler in $CATALINA_HOME/conf/web.xml:

    <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>
        <init-param>
            <param-name>compiler</param-name>
            <param-value>modern</param-value>
        </init-param>
        <init-param>
            <param-name>compilerTargetVM</param-name>
            <param-value>1.5</param-value>
        </init-param>
        <load-on-startup>3</load-on-startup>
    </servlet>

2. Drop ant.jar and ant-launcher.jar from a Tomcat 5.0.x distribution into
$CATALINA_HOME/common/lib.

3. Add a command line argument to the Tomcat start up script:

    -Djavac.source=1.5

This is a big pain.  Recommendations:

1. Bundle the necessary Ant jars.

2. Add a "compilerSource" parameter to the Jasper configuration parameters. 
Better yet, have a single "source" parameter since cross-compilation is an
unlikely use case.

3. Default the source to 1.5.

4. Document the procedure ala the documentation for using Jikes.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to