You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Kelly Chen <ke...@tumbleweed.com> on 2003/01/28 04:53:53 UTC

JspC compile JSP with JSTL

I just wonder if anyone have done this before. I am using JspC to 
compile JSP from the command line.  It was working OK until I tried to 
use JSTL. As soon as I add the following lines to the to be compiled JSP
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

JspC starts to run into error. I debug a bit more into Jasper, the root 
problem is caused by a SAX exception

  [jasper2] [TldLocationsCache] tldConfigJar(/WEB-INF/lib/standard.jar): Process
ing entry 'META-INF/c.tld'
  [jasper2] Parsing /WEB-INF/lib/standard.jar
  [jasper2] The string "--" is not permitted within comments.+ line307
  [jasper2] org.xml.sax.SAXParseException: The string "--" is not permitted with
in comments.
 [jasper2]     at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
 [jasper2]     at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Sour
e)
 [jasper2]     at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:
6)
 [jasper2]     at org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(Pars
rUtils.java:171)
 [jasper2]     at org.apache.jasper.compiler.TldLocationsCache.parseTldForUri(T
dLocationsCache.java:288)
 [jasper2]     at org.apache.jasper.compiler.TldLocationsCache.tldConfigJar(Tld
ocationsCache.java:254)
 [jasper2]     at org.apache.jasper.compiler.TldLocationsCache.processJars(TldL
cationsCache.java:218)
.....

I couldn't really make much sense out of the error message. the standard.jar is jakarta-taglibs, standard-1.0.2. I have been trying to use different version of dom/sax parser, different version of Jasper library. The result is all the same. Do I miss anything obvious? 

I know Jasper supports 1.2 JSTL and it must have been worked from Tomcat, because I have seen UI page shows JSP with the core taglib without issue. I just couldn't figure why JspC couldn't do the same. 

-- 
Kelly Chen                       Tumbleweed Communication Corp.
T:650-216-2043                   700 Saginaw Drive
F:650-216-2565                   Redwood City, CA 94063





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JspC compile JSP with JSTL

Posted by Jack Lauman <jl...@nwcascades.com>.
Kelly:

The "--" is a known bug in a previous version of xerces.  xerces 2.3.0
was released in the last 24 hrs. ad is supposed to cure the problem.
Let me know if it works.

Regards,

Jack Lauman
nwcascades.com

Kelly Chen wrote:
> 
> I just wonder if anyone have done this before. I am using JspC to
> compile JSP from the command line.  It was working OK until I tried to
> use JSTL. As soon as I add the following lines to the to be compiled JSP
> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
> 
> JspC starts to run into error. I debug a bit more into Jasper, the root
> problem is caused by a SAX exception
> 
>   [jasper2] [TldLocationsCache] tldConfigJar(/WEB-INF/lib/standard.jar): Process
> ing entry 'META-INF/c.tld'
>   [jasper2] Parsing /WEB-INF/lib/standard.jar
>   [jasper2] The string "--" is not permitted within comments.+ line307
>   [jasper2] org.xml.sax.SAXParseException: The string "--" is not permitted with
> in comments.
>  [jasper2]     at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>  [jasper2]     at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Sour
> e)
>  [jasper2]     at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:
> 6)
>  [jasper2]     at org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(Pars
> rUtils.java:171)
>  [jasper2]     at org.apache.jasper.compiler.TldLocationsCache.parseTldForUri(T
> dLocationsCache.java:288)
>  [jasper2]     at org.apache.jasper.compiler.TldLocationsCache.tldConfigJar(Tld
> ocationsCache.java:254)
>  [jasper2]     at org.apache.jasper.compiler.TldLocationsCache.processJars(TldL
> cationsCache.java:218)
> .....
> 
> I couldn't really make much sense out of the error message. the standard.jar is jakarta-taglibs, standard-1.0.2. I have been trying to use different version of dom/sax parser, different version of Jasper library. The result is all the same. Do I miss anything obvious?
> 
> I know Jasper supports 1.2 JSTL and it must have been worked from Tomcat, because I have seen UI page shows JSP with the core taglib without issue. I just couldn't figure why JspC couldn't do the same.
> 
> --
> Kelly Chen                       Tumbleweed Communication Corp.
> T:650-216-2043                   700 Saginaw Drive
> F:650-216-2565                   Redwood City, CA 94063
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JspC compile JSP with JSTL

Posted by Henri Gomez <hg...@apache.org>.
Jeanfrancois Arcand wrote:
> Replace the xercesImpl.jar with Xerces 2.1.0. There is a bug in Xerces 
> that cause that strage error.,

Or use the Xerces 2.3.0 which should fix such error ;)



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JspC compile JSP with JSTL

Posted by Jeanfrancois Arcand <jf...@apache.org>.
Replace the xercesImpl.jar with Xerces 2.1.0. There is a bug in Xerces 
that cause that strage error.,

-- Jeanfrancois

Kelly Chen wrote:

> I just wonder if anyone have done this before. I am using JspC to 
> compile JSP from the command line.  It was working OK until I tried to 
> use JSTL. As soon as I add the following lines to the to be compiled JSP
> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
>
> JspC starts to run into error. I debug a bit more into Jasper, the 
> root problem is caused by a SAX exception
>
>  [jasper2] [TldLocationsCache] 
> tldConfigJar(/WEB-INF/lib/standard.jar): Process
> ing entry 'META-INF/c.tld'
>  [jasper2] Parsing /WEB-INF/lib/standard.jar
>  [jasper2] The string "--" is not permitted within comments.+ line307
>  [jasper2] org.xml.sax.SAXParseException: The string "--" is not 
> permitted with
> in comments.
> [jasper2]     at org.apache.xerces.parsers.DOMParser.parse(Unknown 
> Source)
> [jasper2]     at 
> org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Sour
> e)
> [jasper2]     at 
> javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:
> 6)
> [jasper2]     at 
> org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(Pars
> rUtils.java:171)
> [jasper2]     at 
> org.apache.jasper.compiler.TldLocationsCache.parseTldForUri(T
> dLocationsCache.java:288)
> [jasper2]     at 
> org.apache.jasper.compiler.TldLocationsCache.tldConfigJar(Tld
> ocationsCache.java:254)
> [jasper2]     at 
> org.apache.jasper.compiler.TldLocationsCache.processJars(TldL
> cationsCache.java:218)
> .....
>
> I couldn't really make much sense out of the error message. the 
> standard.jar is jakarta-taglibs, standard-1.0.2. I have been trying to 
> use different version of dom/sax parser, different version of Jasper 
> library. The result is all the same. Do I miss anything obvious?
> I know Jasper supports 1.2 JSTL and it must have been worked from 
> Tomcat, because I have seen UI page shows JSP with the core taglib 
> without issue. I just couldn't figure why JspC couldn't do the same.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>