ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vikram Kulkarni" <vkulka...@icope.com>
Subject JspC task to compile JSPs using tags
Date Mon, 25 Nov 2002 16:40:24 GMT
Hi Ant Users,
  I'm trying to run the following JSPC task :
<!-- =================================================================== -->
<!-- Pre-compilation of JSP without deployment to Tomcat                              
                   -->
<!-- This task runs the JSP compiler & turns JSP pages into Java source           
                    -->
<!-- in the build\jspc folder                                                         
                                  -->
<!-- Note: This task is only for syntax checking the JSPs                             
                       -->
<!-- =================================================================== -->
 <target name="jspc" depends="prepare" 
   description="Compile JSP sources">
  
  <echo message="Processing JSPs with JspC"/>

     <jspc  srcdir="${jsp.dir}" 
         destdir="${jsp.build.dir}"
         uriroot="${resources}"
               verbose="9">
         
         <classpath refid="mwc.classpath"/>
            <include name="**/*.jsp" />
        </jspc>
 </target>

My classpath also points to jasper-compiler.jar and jasper-runtime.jar.
I'm using the the taglibs in my JSP like this:

foo.jsp
-------
<%@ taglib uri='struts-template.tld' prefix='template' %>
<%@ taglib uri='struts-html.tld' prefix='html' %>
<%@ taglib uri='struts-bean.tld' prefix='bean' %>
<%@ taglib uri='struts-logic.tld' prefix='logic' %>
<%@ taglib uri='coconet.tld' prefix='coconet' %>
<jsp:useBean id="myHelper" scope="session" 
....
....

On running the task I get the following error:
jspc:
     [echo] Processing JSPs with JspC
     [jspc] Compiling 47 source filesE:\CVSRoot\Source\build\jspc
  [jasperc] 2002-11-25 10:02:18 - Class name is: overview
  [jasperc] 2002-11-25 10:02:18 - Java file name is: E:\CVSRoot\Source\build\jspc\\overview.java
  [jasperc] 2002-11-25 10:02:18 - ERROR-the file 'E:\CVSRoot\Source\jsp\foo.jsp' generated
the following general exception: java.util.EmptyStackException
  [jasperc] java.util.EmptyStackException
  [jasperc]     at java.util.Stack.peek(Stack.java:82)
....
....
....
I read in one of the mails posted here that TLD's should be found in /WEB-INF folder. I guess
my uriroot="${resources}" points to this folder containing the TLDs. Am I missing something
here? Is there any way of checking and getting this task to run for compiling JSP with tags
used?

Regards,
Vikram 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message