Mailing Lists: Apple Mailing Lists

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

Re: Tomcat: Compiling JSPs with JDK 1.5



Maarten,

This should have worked, but it didn't.

    <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>compilerSourceVM</param-name>
            <param-value>1.5</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>


This is what $CATALINA_HOME/conf/web.xml must contain to enable this feature.

I tried various combinations of ant.jar, jasper-compiler-jdt.jar and classes.jar.  If I replace jasper-compiler-jdt.jar with ant.jar, I no longer get compile errors for JDK 1.5 features.  This is what I get instead:

org.apache.jasper.JasperException: Unable to compile class for JSP

Generated servlet error:
error: error reading /System/Library/Java/Extensions/libJ3D.jnilib; java.util.zip.ZipException: error in opening zip file
1 error



        org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
        org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
        org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:246)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
        org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


This is definitely OS X-specific.   It doesn't matter whether or not I include classes.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.