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-startup>11</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

Reply via email to