users@glassfish.java.net

precompile jsp issue on glassfish

From: <glassfish_at_javadesktop.org>
Date: Wed, 01 Sep 2010 13:28:26 PDT

Hi,

I have an web application that runs on glassfish.However, the jsps are very slow and takes ages to load.So, I am looking for options to precompile jsp.

when I checked in the precompile option from the admin console while deploying, glassfish complies only couple of jsps and fails to deploy.Looking into the

server log - it only says time out.

Second option that I used is using maven-jetty-jspc-plugin which basically compiles all the jsp and generates a web.xml.I am using maven-war-plugin that

generates the war and includes the new web.xml generated by jetty plugin.Now, the war deploys fine but the application fails to run and gives an error

message "java.lang.ClassNotFoundException:org.apache.jasper.runtime.ResourceInjector".

Here is the code in my pom.xml

<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-jspc-plugin</artifactId>
<version>6.1.25</version>
<executions>
<execution>
<id>jspc</id>
<goals>
<goal>jspc</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1-beta-1</version>
   <configuration>
        <webXml>${basedir}/target/web.xml</webXml>
   </configuration>
</plugin>


Please let me know if the above is not clear and more information is required.

Any help would be greatly appreciated.
[Message sent by forum member 'jane12']

http://forums.java.net/jive/thread.jspa?messageID=481615