You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Murali <mu...@gmail.com> on 2005/09/29 16:53:47 UTC

How to PreCompile JSPs

Hi ,
 Can you someone provide me some information on how to precompile JSPs
(probably thousands of JSPs) ?
  Regards,
Murali

Re: How to PreCompile JSPs

Posted by Santosh Asbe <sa...@gmail.com>.
Hi,

i have tried to use the code for pre compilation of JSP from the site <
http://www.rgagnon.com/javadetails/java-0414.html>.

In my Application in the JSP folder , there around 6 sub folders and around
25-30 JSP is each of them. When i run this JSP only few JSP's are complied
and then an error is given in the catalina.sh as folows. Can anyone help me
regarding this.


Compile failed; see the compiler error output for details.
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:978)
at org.apache.tools.ant.taskdefs.Javac.execute (Javac.java:799)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java(Compiled
Code))
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
at org.apache.jasper.JspCompilationContext.compile (
JspCompilationContext.java:473)
at org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:190)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationDispatcher.invoke(
ApplicationDispatcher.java :684)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(
ApplicationDispatcher.java:575)
at org.apache.catalina.core.ApplicationDispatcher.include(
ApplicationDispatcher.java:498)
at org.apache.jsp.PreCompileJSPs_jsp.compileAllJsps
(PreCompileJSPs_jsp.java:31)
at org.apache.jsp.PreCompileJSPs_jsp.compileAllJsps
(PreCompileJSPs_jsp.java:34)
at org.apache.jsp.PreCompileJSPs_jsp.compileAllJsps(PreCompileJSPs_jsp.java:34)
at org.apache.jsp.PreCompileJSPs_jsp._jspService(PreCompileJSPs_jsp.java:91)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service (HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:210)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service (JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter (
ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(
StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke (
StandardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext
(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java
:2422)
at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java
:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext
(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(
ErrorDispatcherValve.java :171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext
(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:163)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext
(StandardPipeline.java:641)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(
StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke (
StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext
(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
at org.apache.jk.server.JkCoyoteHandler.invoke (JkCoyoteHandler.java:324)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:395)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673)
at org.apache.jk.common.ChannelSocket.processConnection (ChannelSocket.java
:615)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:683)
at java.lang.Thread.run (Thread.java:567)

Santosh

 On 10/17/05, Paul Singleton <pa...@jbgb.com> wrote:
>
> James Black wrote:
>
> > Murali wrote:
>
> >>Hi ,
> >> Can you someone provide me some information on how to precompile JSPs
> >>(probably thousands of JSPs) ?
>
> > This might help.
> > http://www.rgagnon.com/javadetails/java-0414.html
>
> This (and the site) is cool. Do you reckon it's
> feasible to hook this code to a Lifecycle listener
> or whatever so that it runs as soon as an app is
> started?
>
> Paul Singleton
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.12.1/136 - Release Date:
> 15/Oct/2005
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: How to PreCompile JSPs

Posted by Paul Singleton <pa...@jbgb.com>.
James Black wrote:

> Murali wrote:

>>Hi ,
>> Can you someone provide me some information on how to precompile JSPs
>>(probably thousands of JSPs) ?

> This might help.
> http://www.rgagnon.com/javadetails/java-0414.html

This (and the site) is cool.  Do you reckon it's
feasible to hook this code to a Lifecycle listener
or whatever so that it runs as soon as an app is
started?

Paul Singleton


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.12.1/136 - Release Date: 15/Oct/2005


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to PreCompile JSPs

Posted by James Black <jb...@ieee.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Murali wrote:
> Hi ,
>  Can you someone provide me some information on how to precompile JSPs
> (probably thousands of JSPs) ?

This might help.
http://www.rgagnon.com/javadetails/java-0414.html


- --
"Love is mutual self-giving that ends in self-recovery." Fulton Sheen
James Black    james@usf.edu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDPAIUikQgpVn8xrARAjqMAJ9zT3FPwhgnXPGyG9XvrAmlptzzBQCeNfz5
9s+G7lFVcWAObuJZ5L0YYSw=
=AoqJ
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: How to PreCompile JSPs

Posted by Paul Singleton <pa...@jbgb.com>.
Frank Langanke wrote:

> Murali schrieb:

>> Hi ,
>> Can you someone provide me some information on how to precompile JSPs
>> (probably thousands of JSPs) ?
>>  Regards,
>> Murali

> http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html

It looks to me like the only way to get Jasper 2 to
precompile all JSPs shortly after web app deployment
is to set

   development = false
   reloading = true
   checkInterval = ???

but this is a kludge because I don't expect the pages
to change after deployment, I just want them compiled
before anyone visits them.

If I set checkInterval=10000000 or some very large
value, will the pages be checked straightaway (then
not for ages) or just not for ages?

Paul Singleton


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.12.1/136 - Release Date: 15/Oct/2005


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to PreCompile JSPs

Posted by Frank Langanke <fr...@etvice.com>.
Murali schrieb:

>Hi ,
> Can you someone provide me some information on how to precompile JSPs
>(probably thousands of JSPs) ?
>  Regards,
>Murali
>
>  
>
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org