[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

problem calling servlet

Subject: problem calling servlet
From: Leona Slepetis <lrs@xxxxxxxxxxxx>
Date: Mon, 18 Mar 2002 13:12:03 -0600 (CST)
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.