From Tim's mail, it looks like it's vendor specific, and for optimization reasons you can no longer do this-- which I think stinks, but oh well. Frankly, I wish Jakarta projetcs could be more consistent. In Pluto for example they focus on correctness and not on optimzations, but now in Tomcat I see it's the other way around :-(
Jason
hicham abassi wrote:
Hello,
I have problem with jspc and useBean under Tomcat 5.0.21
I code jspc target into my build.xml which works good under Tomcat 4 but not under Tomcat 5.
There is my ant target :
<target name="compile_with_jspc" depends="prepare_with_jspc" description="Compile Java sources">
<antcall target="compile_javabeans"/> <!-- JSP precompilation --> <taskdef classname="org.apache.jasper.JspC" name="jasper2" > <classpath refid="compile.classpath"/> </taskdef> <jasper2 validateXml="false" verbose="99" package="com.lc.jspc" uriroot="${web.home}" webXmlFragment="${build.home}/WEB-INF/generated_web.xml" outputDir="${build.home}/WEB-INF/src/com/lc/jspc" />
<javac srcdir="${build.home}/WEB-INF/src" destdir="${build.home}/WEB-INF/classes/" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}"> <include name="**/*.java"/> <classpath refid="compile.classpath"/> </javac>
<delete dir="${build.home}/WEB-INF/src"/>
<loadfile property="webinc.xml" srcFile="${build.home}/WEB-INF/generated_web.xml"/>
<copy file="${build.home}/WEB-INF/webtoken.xml" tofile="${build.home}/WEB-INF/web-full.xml">
<filterset>
<filter token="WEB_JSP_XML" value="${webinc.xml}"/>
</filterset>
</copy>
<delete file="${build.home}/WEB-INF/generated_web.xml"/>
<delete file="${build.home}/WEB-INF/webtoken.xml"/>
<move file="${build.home}/WEB-INF/web-full.xml" tofile="${build.home}/WEB-INF/web.xml"/>
</target>
There is the source :
...
<jsp:useBean id="barreNav" scope="request" class="com.lc.beans.basic.BarreNavigation" />
...
the BarreNavigation have of course a no-arg constructor as you said.
There is the exception :
org.apache.jasper.JasperException
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:357)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:141)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1229)
etc ....
--------------------------------------------------------------------- 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]