Hi,
I assume you're already read
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html#Web%20
Application%20Compilation?  To me, that page suggests JspC just creates
java code, and then javac must be called (explicitly, by you) to compile
that code.

Moreover, the error you're getting isn't a Java compilation error, it's
a Jasper JSP translation error, which seems reasonable.

JspC also supports the compile switch, which you can use to turn
compilation on or off.  As you can see by looking at the source code
(http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-jasper/jasper2/src/sha
re/org/apache/jasper/JspC.java?rev=1.84&view=markup), compile is set to
false by default.

Yoav Shapira http://www.yoavshapira.com


>-----Original Message-----
>From: news [mailto:[EMAIL PROTECTED] On Behalf Of Lukas Bradley
>Sent: Friday, October 15, 2004 3:23 PM
>To: [EMAIL PROTECTED]
>Subject: JspC on Tomcat5 vs Tomcat4 - Java Source Generation
>
>On old Tomcat 4 projects, the Manager used Ant to generate Java source
>from my JSPs, which could then be compiled directly with my other Java
>source, and all was good.  The Manager saw that it was good, and it was
>good.
>
>In the great migration to Tomcat 5, the Ant script proclaimed:
>
>"this task doesn't support Tomcat 5.x properly, please use the Tomcat
>provided jspc task instead"
>
>And there was much scurrying.
>
>The Manager defined a new task, one for Tomcat 5.x using
>org.apache.jasper.JspC, for Tomcat 5 begat Jasper2.  (Actually, it was
>earlier, but that's neither here nor there...)
>
>The Manager was pleased that the task looked about the same, and he saw
>that it was good, and it was good.
>
>Until he freaking tried to run it, and it didn't work.
>
>Because it appears as if the task is attempting to generate AND compile
>from JSP to classes, which isn't what I want.  I would really like for
>my Java source to be generated, so I can compile it along-side my
>regular source later.
>
>When trying to compile, it's looking for dependencies in my code that
is
>right beside it, but uncompiled.  Maybe I'm a little off, and it needs
>those binary dependant classes for source generation, but my tingling
>geeky sense tells me otherwise.
>
>What setting am I missing to do this?
>
>Here is the setup:
>
>    <target name="jsp-to-java" depends="prepare">
>       <echoproperties>
>       </echoproperties>
>       <taskdef classname="org.apache.jasper.JspC" name="jasper2">
>          <classpath id="jspc.classpath">
>             <pathelement location="${java.home}/lib/tools.jar" />
>             <fileset dir="${catalina.home}/bin">
>                <include name="*.jar" />
>             </fileset>
>             <fileset dir="${catalina.home}/server/lib">
>                <include name="*.jar" />
>             </fileset>
>             <fileset dir="${catalina.home}/common/lib">
>                <include name="*.jar" />
>             </fileset>
>             <fileset dir="${catalina.home}/shared/lib">
>                <include name="*.jar" />
>             </fileset>
>          </classpath>
>       </taskdef>
>
>       <jasper2 verbose="9"
>          package="p2p.ui.jsp"
>          validateXml="false" webxml="${build.web-inf.dir}/web.xml"
>uriroot="${build.web.dir}" webXmlFragment="${temp}/webinc.xml"
>outputDir="${build.java.source.dir}" />
>    </target>
>
>And the "You suck, I can't find your dependant classes" error:
>
>jsp-to-java:
>   [jasper2] log4j:WARN No appenders could be found for logger
>(org.apache.jasper.compiler.Compiler).
>   [jasper2] log4j:WARN Please initialize the log4j system properly.
>   [jasper2] Oct 15, 2004 3:07:39 PM org.apache.jasper.JspC processFile
>   [jasper2] INFO: Built File: \Error.jsp
>   [jasper2] Oct 15, 2004 3:07:39 PM org.apache.jasper.JspC processFile
>   [jasper2] INFO: Built File: \SecurityException.jsp
>BUILD FAILED: C:\dev\games\conf\build\build.xml:146:
>org.apache.jasper.JasperException:
>file:C:/dev/games/build/web/user/Login.jsp(4,0) Unable to load tag
>handler class "p2p.ui.tags.form.ErrorsTag" for tag "form:errors"
>
>I've started compiled my classes before the JSPs, then including that
in
>the JspC path, but I'm just all flustered now that my previous build
>order has been changed, and expectations are all off.  And I don't want
>to continue pouting.
>
>Inform me, please.
>
>Lukas
>
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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

Reply via email to