users@glassfish.java.net

Re: Is it possible to incrementally precompile JSPs?

From: <Jan.Luehe_at_Sun.COM>
Date: Mon, 25 Jun 2007 15:32:13 -0700

glassfish_at_javadesktop.org wrote:

>I am trying to port a large legacy application from Weblogic 5.x to Glassfish. The JSPs are thousands of lines, with gobs and gobs of embedded coded. WL5 behavior wrt JSPs is quite different from GF, and hence many of the JSP do not even compile. I am using 'precompilejsp' to find the problems without having to click around the entire web site. Precompiling JSPs is very very very slow.
>
>For this project, its takes close to 30min before I see the first error. Then I fix the error, and compile again, waiting another 30min. Fix the error, compile again.... Argg. Can I get asadmin to know that it just precompiled a gazillion JSPs and not do it again?
>
>

Use the "jspc" utility in your GlassFish installation's "bin" directory.
This will skip JSP pages that have already been compiled, so you should
be able to do incremental compiles.

You can then bundle the compiled servlet classes with your webapp,
and set the "usePrecompiled" init-param of the JspServlet in
default-web.xml (or the "usePrecompiled" property of <jsp-config>
in your sun-web.xml) to TRUE. With this setting, you won't even have
to bundle the JSP source files with your webapp: The JSP compiler
will automatically use the precompiled servlet classes. Of course, this
is an option only if your JSPs are not supposed to change.


Jan

>[Message sent by forum member 'memelet' (memelet)]
>
>http://forums.java.net/jive/thread.jspa?messageID=223868
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>