cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Muc <alex....@utoronto.ca>
Subject Solved: ampersand in XSP
Date Sat, 18 Mar 2000 23:33:32 GMT
The solution is to put the section of code in a CDATA section.

Alex Muc wrote:

> Hi,
>
> I've started playing around with XSP pages and I'm having the following
> problem:  When I try to get Cocoon to compile a page with an ampersand
> ("&") in the xsp:logic section it gets interpreted as an XML entity
> reference or something like that.  For example
> ...
> <xsp:logic>
>  private static String getURL() {
>    return "http://www.abc.com?user=foo&password=bar";
>  }
> ...
> </xsp:logic>
> ...
> The problem occurs between the words "foo" and "pass" in the above
> example.  Is there a way to fix this?
>
> Here's the actual stack trace from Cocoon:
>
>         The reference to entity "password" must end with the ';'
> delimiter. [FATAL ERROR] [File:
> "file:/usr/local/jakarta-tomcat/webapps/cocoon/samples/xsp/" Line: 25
> Column: 60]
>                 at
> org.apache.cocoon.parser.AbstractParser.fatalError(AbstractParser.java:105)
>
>                 at
> org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1279)
>                 at
> org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocumentScanner.java:625)
>
>                 at
> org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1299)
>
>                 at
> org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
>
>                 at
> org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1138)
>                 at
> org.apache.cocoon.parser.XercesParser.parse(XercesParser.java:82)
>                 at
> org.apache.cocoon.parser.AbstractParser.parse(AbstractParser.java:83)
>                 at
> org.apache.cocoon.producer.AbstractProducer.getDocument(AbstractProducer.java:96)
>
>                 at org.apache.cocoon.Engine.handle(Engine.java:270)
>                 at org.apache.cocoon.Cocoon.service(Cocoon.java:145)
>                 at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
>                 at
> org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:390)
>
>                 at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:523)
>                 at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:146)
>
>                 at
> org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:334)
>
>                 at java.lang.Thread.run(Thread.java:475)
>
> Thanks
> Alex.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message