precompile jsp in tomcat 6

H

harryos

hi
how do i make my jsp's get precompiled in tomcat6 ? do i use manager
application for this?In some books i read that a shell script has to
be used that calls JspC command-line tool..but i think that is not
included in tomcat 6.

thanks
harry
 
H

harryos


thanks,
however i couldn't make out what values to specify for the elements
like uriroot etc

I want to deploy my application at 'myapp' context in tomcat 6.What
values should i give for the elements?

<target name="jspc">
<jasper
validateXml="false"
uriroot="${context-path}"
webXmlFragment="${context-path}/WEB-INF/
generated_web.xml"
outputDir="${context-path}/WEB-INF/src" />
</target>

When i ran this i get a message that the uriroot must be a pre-
existing directory.
Does that mean i need to create a directory 'myapp' in the build
directory ?I tried that too.Still i am getting this error
I am a newbie to jsp and tomcat..pls help
harry
 
N

nrahimunisa

thanks,
however i couldn't make out what values to specify for the elements
like uriroot etc

I want to deploy my application at 'myapp' context in tomcat 6.What
values should i give for the elements?

<target name="jspc">
     <jasper
             validateXml="false"
             uriroot="${context-path}"
             webXmlFragment="${context-path}/WEB-INF/
generated_web.xml"
             outputDir="${context-path}/WEB-INF/src" />
  </target>

When i ran this i get a message that the uriroot must be a pre-
existing directory.
Does that mean i need to create a directory 'myapp' in the build
directory ?I tried that too.Still i am getting this error
I am a newbie to jsp and tomcat..pls help
harry

Try my example:
<java classname="org.apache.jasper.JspC" fork="true"
failonerror="false">
<arg line="-d ${dir.jspc.gensrc} -v -s -l
-uriroot ${build}/${src}
-webinc ${jspc.webxml.fragment}
-webapp ${build}/${src}"/>
<classpath>
<fileset dir="${classpath}" includes="ant.jar"/>
<fileset dir="${ant.home}/lib" includes="*.jar"/>
<fileset dir="${tomcat.home}/lib" includes="*.jar"/>
<fileset dir="${tomcat.home}/bin" includes="*.jar"/>
</classpath>
</java>

<javac debuglevel="lines,vars,source" srcdir="${build}/${src}/WEB-INF/
src" destdir="${build}/src/${classes}" classpath="${classpath}"
fork="true" failonerror="true">
<classpath>
<fileset dir="${classpath}" includes="*.jar"/>
<fileset dir="${tomcat.home}/lib" includes="*.jar"/>
</classpath>
<exclude name="**/common/galleryThumbnail_jsp.java" />
<exclude name="**/common/gallerybuilderfooter_jsp.java" />
</javac>

URIROOT & WEBAPP should be same source folder where jsp are placed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top