[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] problem calling servlet
This file is being called as a form action. I am trying to call a servlet which parses the XML in the file variable, but I get the following exception. org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed The servlet is only getting the "<![CDATA[<?xml" part of the file variable. I've tried URLEncoder and removing the CDATA markup, but nothing has worked. Does anyone know what I'm doing wrong? Thanks, Leona Slepetis source of adddetail.xml: <?xml version="1.0"?> <?cocoon-process type="xsp"?> <?cocoon-process type="xslt"?> <?xml-stylesheet href="gs.xsl" type="text/xsl"?> <xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core" xmlns:util="http://www.apache.org/1999/XSP/Util"> <xsp:structure> <xsp:include>java.lang.*</xsp:include> <xsp:include>java.util.*</xsp:include> <xsp:include>java.io.*</xsp:include> <xsp:include>java.net.URLEncoder</xsp:include> </xsp:structure> <page> <xsp:logic> String strAction; strAction = request.getParameter("action"); strTransaction = "<![CDATA[<?xml version=\"1.0\"?><KGTransactions>" + "<KGTransaction action=\"" + strAction + </KGTransaction></KGTransactions>]]>"; String x = "http://localhost:8080/kong/servlet/Replicate?file="+strTransaction; </xsp:logic> <util:include-uri> <util:href> <xsp:expr>x</xsp:expr> </util:href> </util:include-uri> </page> </xsp:page> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|