struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: [OT] Precompiling JSP with JSTL tag Libs
Date Fri, 18 Jul 2003 16:14:45 GMT


On Fri, 18 Jul 2003, Pat Quinn wrote:

> Date: Fri, 18 Jul 2003 16:41:33 +0100
> From: Pat Quinn <pat_quinn2009@hotmail.com>
> Reply-To: Struts Users Mailing List <struts-user@jakarta.apache.org>
> To: struts-user@jakarta.apache.org
> Subject: [OT] Precompiling JSP with JSTL tag Libs
>
> Sorry guys this is not a struts question but i'm hoping someone on here has
> had this problem before.... ive got an ANT task to precompile my jsp's
> everything worked fine until i decided to upgrade to use JSTL tag libs not i
> get the following error,
>
> [echo] Precompiling JSPS
> 2003-07-18 04:27:26 - Internal Error: File /WEB-INF/web.xml not found
> 2003-07-18 04:27:29 - ERROR-the file '\jsp\myjsp.jsp'
> generated the following general exception: org.apache.jasper.JasperException
>
> : XML parsing error on file /WEB-INF/tld/c.tld: (line 307, col 39):
> The string "--" is not permitted within comments.
> [jasper] Error in class org.apache.jasper.JspC
>
> MyJsp.jsp is the only jsp which is currently using the c.tld.
>
>
> My ANT Task is as follows:
>
>
>     <target name="jsp"  depends="webinf">
>         <taskdef name="jasper"
>                  classname="org.apache.jasper.JspC"
>                  classpath="${class.path}"/>
>
>         <echo message="Precompiling JSPS"/>
>
>         <jasper package="com.my.web.servlets"
>                 uriroot="${web.basedir}"
>                 webXmlFragment="${jsp.web.fragment.file}"
>                 outputDir="${web.src.dir}" />
>     </target>
>
>
> Any Ideas as i'm going crazy now.... I've tried upgrading to xerces 2.4.0
> but i still get the same error.

I suspect that it really is related to your XML parser ... this looks
suspiciously like a bug in earlier versions of Xerces.  It turned out that
one of our Struts DTDs had a comment line longer than 80 characters, but
caused Xerces to output a totally bogus error just like this, pointing at
a place totally unrelated to where the problem really was.

Note that, if you're using JDK 1.4, simply putting Xerces 2.4 into your
classpath does *not* replace the use of the built-in parser.  You have to
put it in the "endorsed standards" directory ($JAVA_HOME/jre/endorsed I
*think* -- it's in the JDK docs), or use a system property to declare the
directory containing this JAR to be your endorsed directory.

To use an updated parser in Tomcat 4.1 or later, put it in
$CATALINA_HOME/common/endorsed.

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message