Hello everyone,
I am using the following fragment in a JSP document (the XML variant of
JSP pages):
hrefmyurl?param1=value1amp;param2=value2/href
The problem is, Tomcat sends this fragment to the browser as
hrefmyurl?param1=value1param2=value2/href
which causes an XML parsing exception on the
Informatics
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Andreas Schildbach
Sent: Monday, August 23, 2004 3:31 PM
To: [EMAIL PROTECTED]
Subject: Ampersand problem in JSP document
Hello everyone,
I am using the following fragment in a JSP document (the XML variant of
JSP
Try to append amp to the amp; fragment it should end like this
amp;amp; and the output would be amp;
Andreas Schildbach escribió:
Hello everyone,
I am using the following fragment in a JSP document (the XML variant
of JSP pages):
hrefmyurl?param1=value1amp;param2=value2/href
The problem
Shapira, Yoav wrote:
Does it happen if you have a proper JSP XML page, e.g.
jsp:root
xmlns:jsp=http://java.sun.com/JSP/Page;
version=1.2
jsp:text![CDATA[html
body
center
h1Hello World/h1
/center
/body
/html]]/jsp:text
/jsp:root
It happens with the
John Villar wrote:
Try to append amp to the amp; fragment it should end like this
amp;amp; and the output would be amp;
It is my understanding that if an XML document is serialized to an
output stream, characters like , and are represented by their
entities amp; gt; lt so an XML parser
LOL that's true. i think yoav gave you the right solution
try embedding your xml processor offending fragment into a
jsp:text![CDATA[ ]]/jsp:text that should do the work
It is my understanding that if an XML document is serialized to an
output stream, characters like ,
Hi,
(jumping in late) Have you tried:
jsp:directive.page contentType=text/xml /
and perhaps:
jsp:output doctype-root-element=html
doctype-public=-//W3C//DTD XHTML 1.0 Transitional//EN
doctype-system=http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd/
best,
-Rob
Andreas Schildbach