dev@glassfish.java.net

Re: JSP seems to be compiled externally. Why?

From: Scott Oaks <Scott.Oaks_at_Sun.COM>
Date: Thu, 23 Mar 2006 14:23:47 -0500

You can configure the appserver so that it compiles JSPs in process:

Edit your domain's default-web.xml and
add a "fork" init param with a value of "false" to your JspServlet, as
follows:

  <servlet>
    <servlet-name>jsp</servlet-name>
    <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
    <init-param>
      <param-name>xpoweredBy</param-name>
      <param-value>true</param-value>
    </init-param>
    <init-param>
      <param-name>fork</param-name>
      <param-value>false</param-value>
    </init-param>
    <load-on-startup>3</load-on-startup>
  </servlet>

I continue to advocate that this should be the default.

-Scott

On Thu, 2006-03-23 at 14:15, Kohsuke Kawaguchi wrote:
> I was deploying a new appliation to Glassfish this morning with Dinesh,
> and we noticed that it seems to be compiling JSPs by launching an
> external javac (more over, it seems to be doing so for each tag file.)
>
> This made it unbearably slow to see the web pages. Why is it doing so?
> Can't we just load javac in the AppServer JVM?