Hi

I tried to use this build.xml. It help me alot but I still have some difficulties.
My build.xml is use to compile many other elements.
Because of that build.xml is not located in the directory where are the jsp.
How can I declare the directory where are located the jsp files to translate ?


Best regards

Andre

Tim Funk wrote:

You need common/lib/jasper-compiler.jar in your classpath. [And probably a couple of other files in common/lib]

-Tim

Evgeny Gesin wrote:

Hi,
when I run that code I get this error "No public
no-arg constructor in class org.apache.jasper.JspC",
probably in "<taskdef>"

What could be wrong?

Evgeny

--- Tim Funk <[EMAIL PROTECTED]> wrote:

Use this in your build.xml ...


<target name="jsp-compile" depends="compile" description="prcompile the jsps"> <!-- declare JspC task --> <taskdef classname="org.apache.jasper.JspC" name="jasper2" > <classpath refid="classpath"/> </taskdef>

<!-- declare and make scratch dirs for the java
files and classes -->
<property name="jsp.src"
value="${build.dir}/WEB-INF/jspc/src"/>
<property name="jsp.classes"
value="${build.dir}/WEB-INF/jspc/classes"/>
<mkdir dir="${jsp.src}"/>
<mkdir dir="${jsp.classes}"/>

<!-- turn the jsp's into java files -->
<jasper2 compile="false"
validateXml="false"
uriroot="${build.dir}"


webXmlFragment="${build.dir}/WEB-INF/generated_web.xml"

addWebXmlMappings="true"
outputDir="${jsp.src}" />

<!-- compile java files -->
<javac destdir="${jsp.classes}"
optimize="off"
debug="on" failonerror="false"
srcdir="${jsp.src}"
excludes="**/*.smap">
<classpath refid="classpath"/>
<include name="**" />
</javac>

<!--
Take the compiled java files and put em in a
jar
You really don't need this step but I like jar
files.
-->
<jar
jarfile="${build.dir}/WEB-INF/lib/jsps.jar"
index="false">
<fileset dir="${jsp.classes}">
<include name="**/*.class" />
</fileset>
</jar>

<!-- Chuck build jsp src and classes -->
<delete dir="${jsp.src}"/>
<delete dir="${jsp.classes}"/>

</target>


-Tim


Hofmann, Benjamin wrote:


How do I set up my Tomcat 5 to precompile all of


my JSP files?




---------------------------------------------------------------------

To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]








__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to