Results 1 to 2 of 2
  1. #1
    albgist is offline Member
    Join Date
    Jun 2013
    Rep Power

    Default Precompiling JSP pages

    Hello, sorry for my English.
    I’m trying to precompile JSP files with ANT script.
    With this I generated servlets from JSP:
    Java Code:
    <target name="jspc">
    	<taskdef classname="org.apache.jasper.JspC" name="jasper2">
    		<classpath id="jspc.classpath">
    			<pathelement location="C:\j2sdk1.4.2_12\lib\org.apache.jasper.jar" />
    			<path refid="jbossweb.classpath"/>
    	<jasper2 validateXml="false" uriroot="${webapp.path}" package="org.fista.zg.ui.struts.pages" webXmlFragment="c:/generated_web.xml" outputDir="${webapp.path}/WEB-INF/src" />
    So, now I have Servlet classes, and I want compile these classes. Some classes have been compiled successfully, but some not, many of unsuccessfully compiled pages thrown same error, for example:
    Java Code:
    [javac] C:\Documents and Settings\Administrator\workspace\web-admin\WebContent\WEB-INF\src\ cannot resolve symbol
        [javac] symbol  : variable actionForm 
        [javac] location: class org.fista.zg.ui.struts.pages.agencyDelete_jsp
        [javac] 		new Object[] {((AgencyInputForm)((DefaultInputActionForm)actionForm).getFormBean()).getContractNr()});
        [javac]                                                                          ^
    In JSP agencyDelete.jsp:
    Java Code:
    <bean:define id="actionForm" name="AgencyForm" />
    String message = WebCtrlFactory.getCtrl(request).getLocalizationString("",
    new Object[] {((AgencyInputForm)((DefaultInputActionForm)actionForm).getFormBean()).getContractNr()});
    Ant compiling script:
    Java Code:
    <javac destdir="${webapp.path}/WEB-INF/classes" optimize="off" debug="on"
    			failonerror="false" srcdir="${webapp.path}/WEB-INF/src" excludes="**/*.smap" classpath="C:\Documents and Settings\Administrator\workspace\web-admin\build\classes">
    		<fileset dir="${webapp.path}/WEB-INF/lib">
    		      <include name="*.jar" />
    		<path refid="jbossweb.classpath"/>
    	<include name="**" />
    	<exclude name="tags/**" />
    	<exclude name="tiles/**" />
    So, please help me find the problem. I think problem is in:
    Java Code:
    <bean:define id="actionForm" name="AgencyForm" />
    Why compiler can't see this bean?

    Thank you!
    Last edited by albgist; 06-10-2013 at 03:19 PM.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: Precompiling JSP pages

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. differentiate user pages and admin pages in struts
    By phaniyelugula in forum Struts
    Replies: 3
    Last Post: 10-19-2012, 05:51 PM
  2. JSP pages
    By dalu in forum New To Java
    Replies: 6
    Last Post: 04-29-2011, 01:20 PM
  3. Image from pages
    By shakeel in forum Java 2D
    Replies: 1
    Last Post: 03-01-2011, 05:30 PM
  4. how to use Multiple GUI pages
    By jonwymore in forum SWT / JFace
    Replies: 3
    Last Post: 12-06-2010, 11:13 AM
  5. Getting all the pages from a domain
    By eva in forum New To Java
    Replies: 0
    Last Post: 12-25-2007, 11:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts