I have set up an ant task to precompile JSPs and everything works fine *if* there are no errors in the JSP.

The ant task is:

<target name="jspc" depends="prepare" description="Compile JSP files">
<taskdef classname="org.apache.jasper.JspC" name="jasper2" >
<classpath id="jspc.classpath">
<pathelement location="${java.home}/../lib/tools.jar"/>
<fileset dir="${extlib.home}">
<include name="**/*.jar"/>
</fileset>
</classpath>
</taskdef>
<jasper2 verbose="4"
validateXml="false"
uriroot="${build.home}"
webXmlFragment="${web.home}/WEB-INF/generated_web.xml"
outputDir="${build.home}/WEB-INF/src" />
<loadfile
srcfile="${web.home}/WEB-INF/generated_web.xml" property="gen.web.xml">
<filterchain >
<tokenfilter delimoutput="\r\n"/>
</filterchain>
</loadfile>
<delete file="${web.home}/WEB-INF/generated_web.xml"></delete>
<delete file="${build.home}/WEB-INF/web.xml"></delete>
<copy tofile="${build.home}/WEB-INF/web.xml"
file="${web.home}/WEB-INF/web.xml">
<filterset>
<filter value="${gen.web.xml}" token="jspServlets"/>
</filterset>
</copy>
</target>


If I introduce an error into the JSP page, such as:

        <c:url var="url"/>
        <img src="${url}"/>

(where c: is the JSTL common taglib) the ant task ends without errors and I get a NullPointerException when I test the page on the server.

How can I get my jspc ant task to show errors in the JSP?

Using Tomcat 5.0.25.

Cheers,

Simon


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



Reply via email to