Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

useBean and jspc problems under Tomcat 5.0.21

hicham abassi

2004-05-04

Replies:

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: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.