[JBoss-user] JSP precompilation after 3.2.5 upgrade
Hello: I am attempting to upgrade from JBoss 3.0.4 to 3.2.5. However, following the upgrade, I can no longer seem to precompile my JSPs as I did before. The following build.xml extract worked fine in 3.0.4: jspc srcdir=${srcDir} destdir=${jspDir} package=${pkgName} verbose=2 compilerclasspath=${env.CATALINA_HOME}/jasper-compiler.jar include name=**/*.jsp / classpath pathelement path=${env.CATALINA_HOME}/servlet-api.jar/ pathelement path=${env.CATALINA_HOME}/commons-logging.jar/ pathelement path=${env.CATALINA_HOME}/jasper-compiler.jar/ pathelement path=${env.CATALINA_HOME}/jasper-runtime.jar/ pathelement path=${env.XERCES_HOME}/xmlParserAPIs.jar/ pathelement path=${env.XERCES_HOME}/xercesImpl.jar/ pathelement path=${srcDir}/WEB-INF/lib/taglibs.jar/ /classpath /jspc Follwing the 3.2.5 upgrade, this now produces errors such as the following: [jasperc] org.apache.jasper.JasperException: Unrecognized option: -v2. Use -help for help. I have also unsuccessfuly tried the apparebtly new, Tomcat 5 recommended way of precompiling as follows: taskdef classname=org.apache.jasper.JspC name=jasper2 classpath pathelement path=${env.JAVA_HOME}/lib/tools.jar/ fileset dir=${env.CATALINA_HOME} include name=*.jar/ /fileset fileset dir=${env.CATALINA_HOME}/ include name=servlet*.jar/ /fileset fileset dir=${env.CATALINA_HOME}/ include name=commons*.jar/ /fileset pathelement path=${srcDir}/WEB-INF/lib/taglibs.jar/ /classpath /taskdef jasper2 validateXml=false uriroot=${srcDir} webXmlFramgment=${srcDir}/WEB-INF/generated_web.xml outputDir=${jspDir}/ This produces the following error java.lang.IncompatibleClassChangeError: Implementing class What am I missing and/or not doing in the new version? This is a stock 3.2.5 installation. Thanks! --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721alloc_id=10040op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] JSP precompilation
Hello, I have got the servlet-mapping statements for each of the JSP in my web.xml (via the ant compile of the JSP pages). I removed the JSP pages from my war file(no longer deploy them).I have put the .java and .class files of the JSP pages under tomcat-4.1.x/work/ MainEngine/localhost/MyApp/ Now when I try to access the web pages, I get a Class not found error for the webpage. I am just trying to run the webapp within JBOSS by using the tomcat engine. Not sure if I am still missing something. thanks in advance. Kavitha -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Neal Sanche Sent: Saturday, December 13, 2003 11:59 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] JSP precompilation On December 13, 2003 07:48 am, Kavitha Ranga wrote: Hello, I am using JBOSS and tomcat for EJB and webapps. In order to speed up the JSP's I have precompiled all the JSP's using ant and have dumped all the .java and .class for each of the jsp under the tomcat directory of jboss ie, tomcat-4.1.x/work/ MainEngine/localhost/MyApp/ However it appears that the first time the JSP's are called, JBOSS again compiles them and the precompilation does not seem to have any effect. Is there something more to it than just dumping the .java and .class files into the tomcat directory of JBOSS? Any help is appreciated. Yes, there is more to it than that. You have to remove the .JSP files from your application, or don't deploy them. Next you have to set up servlet and servlet-mapping statements for each .JSP in your web.xml. The JSP compiler can be made to output these mappings into a file. Then you have to put the compiled JSPs into your application's classpath. Usually this is WEB-INF/classes/... For an example of all of this download http://www.nsdev.org/jboss/stories/nsdev-framework-1.1.zip and look at the build/webapps/build.xml at the do-precompile-jsp target. Then look at the precompile-jar target where you will see that I am excluding **/*.jsp when I'm building the .WAR file. Cheers. -Neal --- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] JSP precompilation
Hello, I am using JBOSS and tomcat for EJB and webapps. In order to speed up the JSP's I have precompiled all the JSP's using ant and have dumped all the .java and .class for each of the jsp under the tomcat directory of jboss ie, tomcat-4.1.x/work/ MainEngine/localhost/MyApp/ However it appears that the first time the JSP's are called, JBOSS again compiles them and the precompilation does not seem to have any effect. Is there something more to it than just dumping the .java and .class files into the tomcat directory of JBOSS? Any help is appreciated. Kavitha --- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] JSP precompilation
On December 13, 2003 07:48 am, Kavitha Ranga wrote: Hello, I am using JBOSS and tomcat for EJB and webapps. In order to speed up the JSP's I have precompiled all the JSP's using ant and have dumped all the .java and .class for each of the jsp under the tomcat directory of jboss ie, tomcat-4.1.x/work/ MainEngine/localhost/MyApp/ However it appears that the first time the JSP's are called, JBOSS again compiles them and the precompilation does not seem to have any effect. Is there something more to it than just dumping the .java and .class files into the tomcat directory of JBOSS? Any help is appreciated. Yes, there is more to it than that. You have to remove the .JSP files from your application, or don't deploy them. Next you have to set up servlet and servlet-mapping statements for each .JSP in your web.xml. The JSP compiler can be made to output these mappings into a file. Then you have to put the compiled JSPs into your application's classpath. Usually this is WEB-INF/classes/... For an example of all of this download http://www.nsdev.org/jboss/stories/nsdev-framework-1.1.zip and look at the build/webapps/build.xml at the do-precompile-jsp target. Then look at the precompile-jar target where you will see that I am excluding **/*.jsp when I'm building the .WAR file. Cheers. -Neal --- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] JSP PreCompilation
I found another workaround and that looks better to me. It's to include the following in application's web.xml for each jsp file one wish to preCompile. servlet jsp-file/interest/ListAll.jsp/jsp-file load-on-startup11/load-on-startup /servlet This will compile the jsp file at the time of deployment (I have all in the .war file). Thanks, Tahir -Original Message- From: Gregor Rayman [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 28, 2001 5:20 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] JSP PreCompilation Tahir Awan [EMAIL PROTECTED] wrote: Hi, Any idea if its possible topreCompile JSPs bundled in .war file? I could not find anything on jakarta.org about this. Thanks, Tahir Here an Ant task. You need to customize it: java classname=org.apache.jasper.JspC dir=ear fork=yes classpath !-- all needed jars -- fileset dir=${libs.web} include name=**/*.jar/ /fileset fileset dir=${tomcat.home}/lib include name=**/*.jar/ /fileset /classpath arg line=-d ../src -p org.your.package.name.jsp -webxml www.xml -webapp war/ /java This converts JSP to Java, you have to compile Java then to classes. My directory structure is ./src - Java classes ./ear/war - web application (JSP, WEB-INF with lib etc.) -- gR ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] JSP PreCompilation
Tahir Awan [EMAIL PROTECTED] wrote: Hi, Any idea if its possible topreCompile JSPs bundled in .war file? I could not find anything on jakarta.org about this. Thanks, Tahir Here an Ant task. You need to customize it: java classname=org.apache.jasper.JspC dir=ear fork=yes classpath !-- all needed jars -- fileset dir=${libs.web} include name=**/*.jar/ /fileset fileset dir=${tomcat.home}/lib include name=**/*.jar/ /fileset /classpath arg line=-d ../src -p org.your.package.name.jsp -webxml www.xml -webapp war/ /java This converts JSP to Java, you have to compile Java then to classes. My directory structure is ./src - Java classes ./ear/war - web application (JSP, WEB-INF with lib etc.) -- gR ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] JSP PreCompilation
Hi, Any idea if its possible topreCompile JSPs bundled in .war file? I could not find anything on jakarta.org about this. Thanks, Tahir ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user