You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Kumar, Ritesh (GEP, Contractor)" <Ri...@gepex.ge.com> on 2000/08/31 19:58:24 UTC

How to pass multiple parameter to a servlet from a xml file...

Hi 
    I am not able to call a servlet with multiple parameters from an XML
file. The code in xml file is

<Nav xlink:type="simple"
xlink:href="http://3.77.10.84:8080/servlet/TestServlet?name=ritesh&title=kum
ar">Introduction</Nav>

When I try to view the page (I am using xalan's DefaultApplyXSL servlet to
view the page) I get this exception.
Exception occurred during Transformation: 
Parsing XML Document from request parameter: http://39XB10B/Process_Fits.xml

Parsing XSL Stylesheet Document from request parameter:
http://39XB10B/introduction.xsl 
Parsing XML Document from request parameter: http://39XB10B/Process_Fits.xml

The reference to entity "title" must end with the ';' delimiter. 
 org.apache.xalan.xslt.XSLProcessorException: The reference to entity
"title" must end with the ';' delimiter.

But if I pass just one parameter to the servlet, it works fine.
<Nav xlink:type="simple"
xlink:href="http://3.77.10.84:8080/servlet/TestServlet?name=ritesh">Introduc
tion</Nav>
This piece of code is working...

Please suggest as to how to pass multiple parameters to servlet from an xml
file.

Thanks,
Ritesh Kumar


Re: How to pass multiple parameter to a servlet from a xml file...

Posted by "Sergei S. Ivanov" <se...@mail.ru>.
----- Original Message -----
From: "Kumar, Ritesh (GEP, Contractor)" <Ri...@gepex.ge.com>
To: <xa...@xml.apache.org>
Sent: Thursday, August 31, 2000 9:58 PM
Subject: How to pass multiple parameter to a servlet from a xml file...


> Hi
>     I am not able to call a servlet with multiple parameters from an XML
> file. The code in xml file is
>
> <Nav xlink:type="simple"
>
xlink:href="http://3.77.10.84:8080/servlet/TestServlet?name=ritesh&title=kum
> ar">Introduction</Nav>

Try escaping all occurrences of & in the URL string as &amp;

xlink:href="http://3.77.10.84:8080/servlet/TestServlet?name=ritesh&amp;title
=kumar"
-should work

--
Sergei S. Ivanov  webmaster@object-tools.com
Object Tools, Moscow  http://www.object-tools.com