2 Replies Latest reply on May 21, 2007 1:19 PM by jobbyjoseph

    Migration from Jetty to Tomcat 5.5 issue: precompiled jsp er

    kosulin

      We migrate from JBoss 3.2.3/jetty to JBoss 4.0.3SP1/Tomcat 5.5
      Our ear deploys fine, but when i try to open main page in a browser, I am getting an Exception:
      11:37:45,193 ERROR [error_jsp]] Servlet.service() for servlet com.wsc.taxgard.jsp.error_jsp threw exception
      java.lang.NullPointerException
      at org.apache.jasper.runtime.TagHandlerPool.get(TagHandlerPool.java:108)
      at com.wsc.taxgard.jsp.error_jsp._jspx_meth_c_if_0(error_jsp.java:103)
      at com.wsc.taxgard.jsp.error_jsp._jspService(error_jsp.java:73)

      My main page redirects to error.jsp, and this is fine, but it looks like there is an issue with Tomcat loading/handling of JSTL 1.0 in use by our application.

      Any ideas how to fix this?

      Thanks.

        • 1. Re: Migration from Jetty to Tomcat 5.5 issue: precompiled js
          kosulin

          Tomcat 5.5 requires use of it's own Jasper JspC compiler for pre-compilation of JSP.
          The use of default JspC task from ANT 1.6.5 caused the issue.

          • 2. Re: Migration from Jetty to Tomcat 5.5 issue: precompiled js

            Thanks, well said, I have been looking into this issue for a while.
            This is part of my build file and this fixed my problem

            <!-- JJ added this -->
             <path id="ant1.classpath">
             <fileset dir="${basedir}/build/lib">
             <include name="**/*.jar"/>
             <include name="**/*.zip"/>
             </fileset>
             <fileset dir="${basedir}/source/j2ee/lib">
             <include name="**/*.jar"/>
             <include name="**/*.zip"/>
             </fileset>
             <fileset dir="${basedir}/source/webserver/webapp/src/WEB-INF/lib">
             <include name="**/*.jar"/>
             <include name="**/*.zip"/>
             </fileset>
             <fileset dir="${basedir}/source/webserver/java/lib">
             <include name="**/*.jar"/>
             <include name="**/*.zip"/>
             </fileset>
             <fileset dir="${basedir}/source/common/java/lib">
             <include name="**/*.jar"/>
             <include name="**/*.zip"/>
             </fileset>
             <!-- JJ added this -->
             <fileset dir="${basedir}/source/common/dist">
             <include name="**/*.jar"/>
             </fileset>
            
             <!-- Now add the tomcat related jars -->
             <fileset dir="${basedir}/build/lib/tomcat/server/lib">
             <include name="**/*.jar"/>
             <include name="**/*.zip"/>
             </fileset>
             <fileset dir="${basedir}/build/lib/tomcat/commons/lib">
             <include name="**/*.jar"/>
             <include name="**/*.zip"/>
             </fileset>
            
            
             </path>
            
             <target name="jspcc">
             <taskdef name="jasper2" classpath="${basedir}/build/lib/tomcat/commons/lib/jasper-compiler.jar"
             classname="org.apache.jasper.JspC">
             <classpath refid="ant1.classpath"/>
             </taskdef>
            
             <jasper2
             validateXml="false"
             outputDir="${jsp.precompile.build.src}"
             compiler="jasper55"
             package="${jsp.precompile.servlet.package}"
             uriroot="${jsp.precompile.jsp.src}"
             webXmlFragment="${jsp.precompile.jsp.webxml}"
             >
             </jasper2>
            
             </target>