Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Problems precompiling with Jasper2 in Jetty8

I am migrating a webapp from Jetty6 (stop laughing, it's worked well for years) to Jetty8 and I'm getting the following error:

org.apache.jasper.JasperException: file:D:/dev/HEAD/eadev/clients/java/cfgmgr/jsp/displayAttribute.jsp(7,62) PWC6188: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

This compile use to work in Jetty 6 but now fails.  I see this in quite a few places in a Google search, but most appear in reference to this error when loading the webapp, not when precompiling it. 

I tried changing the Ant task to follow joakime suggested task at http://stackoverflow.com/questions/11735628/precompile-jsps-into-classes-for-jetty8-using-ant but to no avail. 

I am using 8.1.7.v20120910, but I get the same error with 7.6.7.v20120910.

The webapp is precompiled using an Ant task with the following target:
  <target name="jspc" depends="init, version_compile, mqservlets">

    <path id="jasper2.classpath">
      <fileset dir="${env.JETTY_HOME}">
            <include name="lib/servlet-api-*.jar" />
            <include name="lib/jsp/*.jar" />
      </fileset>
    </path>

    <pathconvert property="jasper2.classpath" refid="jasper2.classpath" />
    <echo message="jasper2.classpath=${jasper2.classpath}" />

    <mkdir dir="${webcfgmgr}/jsp/servlets"/>
    <taskdef classname="org.apache.jasper.JspC" name="jasper2" classpathref="jasper2.classpath"/>

    <jasper2
            package=""
            uriroot="${webcfgmgr}/jsp"
            validateXml="false"
            webXmlFragment="${webcfgmgr}/WEB-INF/generated_web.xml"
            outputDir="${webcfgmgr}/jsp/servlets"/>
  </target>

The classpath output is:
jspc:
     [echo] jasper2.classpath=D:\dev\jetty-distribution-8.1.7.v20120910\lib\jsp\com.sun.el-2.2.0.v201108011116.jar;D:\dev\jetty-distribution-8.1.7.v20120910\lib\jsp\javax.el-2.2.0.v201108011116.jar;D:\dev\jetty-distribution-8.1.7.v20120910\lib\jsp\javax.servlet.jsp-2.2.0.v201112011158.jar;D:\dev\jetty-distribution-8.1.7.v20120910\lib\jsp\javax.servlet.jsp.jstl-1.2.0.v201105211821.jar;D:\dev\jetty-distribution-8.1.7.v20120910\lib\jsp\org.apache.jasper.glassfish-2.2.2.v201112011158.jar;D:\dev\jetty-distribution-8.1.7.v20120910\lib\jsp\org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar;D:\dev\jetty-distribution-8.1.7.v20120910\lib\jsp\org.eclipse.jdt.core-3.7.1.jar;D:\dev\jetty-distribution-8.1.7.v20120910\lib\servlet-api-3.0.jar

The source line this barfs on is:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>

Anyone have any suggestions?  Thanks for any help you can give me.


Back to the top