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

Calling any servlet within xml

Subject: Calling any servlet within xml
From: Mala Ramakrishnan <mala@xxxxxxxxxxxxx>
Date: Thu, 2 Nov 2000 17:27:38 -0400 (EST)
servlet request.getparameters
Hi,

I can't seem to figure out what could be wrong with my code, maybe I'm
just not doing this the right way, it's my first time. I used pieces of
information from the archives to do this.

I need to pass in parameters to an xml file - which are the servlet url,
and a couple of parameters for the servlet. The servlet returns an xml
file which has info to create a form. I get a blank screen on my browser
when I call the xml file. Here is how my code looks:

HandleForm.xml
---------------

<?xml version="1.0"?>
<?cocoon-process type="xsp"?> 
<?xml-stylesheet href="HandleForm.xsl" type="text/xsl"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsp:page xmlns:xsp="http://www.apache.org/1999/XSP/Core"
          xmlns:util="http://www.apache.org/1999/XSP/Util">
<page>

    <xsl:element name="util:include-uri">
       <xsl:attribute name="href">
       <xsp:logic>

        <![CDATA[
          String[] url = request.getParameters("url"); 
          String[] op = request.getParameters("operation");
          String[] stage = request.getParameters("stage");
         ]]>     

         <xsl:value-of select=
                "concat(url, '?operation=', op, '&amp;stage=', stage)"
/>
       </xsp:logic>    
       </xsl:attribute>  
    </xsl:element>

</page>
</xsp:page>
</xsl:stylesheet>

HandleForm.xsl
---------------
<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsp:page xmlns:xsp="http://www.apache.org/1999/XSP/Core"
          xmlns:util="http://www.apache.org/1999/XSP/Util">

<xsl:template match="input">
 <xsl:processing-instruction name="cocoon-format">
        type="text/html"
 </xsl:processing-instruction>
       
 <html>
   <head>
       <title> New Router </title>
   </head>
    <body bgcolor="#ffffff">
       Hiya! The formatting for the xml returned by the servlet   		goes
here.
    </body>
   </html>
</xsl:template>
</xsp:page>
</xsl:stylesheet>
~




 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.