You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ganasen Gounden <gg...@CCT.ORG.ZA> on 2001/04/04 15:07:33 UTC

Can a servlet call another servlet to receive it's XML data in order to sent it to XSLT processor?

Hello

I have a XMLservlet() that is called from the browser with certain parameters. It returns a set of XML data that is transformed to HTML using an XSLT style sheet on the client side browser(ie5). 

Because not all users browsers have this capability yet, I want to try using XALAN parsers to transform this xml data on the server side (Tomcat 3.2) to return html code to the browser. 

As my knowldege on servlets are limited I would like some guidlines or preferably some sample code on how to do this:

ie I would like the browser to call a JSP or another Servlet program to receive the paramters from the browser, call the XMLservlet with these parameters, receive the xmldata from the XMLServlet and parse it to the Xalan parsers for processing with the appropriate style sheet and then return the HTML result to the client browser.

Your help is appreciated.

Regards

Gan Gounden
City of Cape Town
Ph (021) 400-2174
Fax (021) 425-1096
Cell 083-63-59-268
e-mail: ggounden@cct.org.za




**********************************************************************
Any unauthorized use and interception of this e-mail is illegal.
If this e-mail is not intended for you, you may not copy, 
distribute or disclose the contents to anyone.  This e-mail 
does not give rise to any binding legal obligations upon the
City of Cape Town unless the City of Cape Town subsequently
confirms the content in writing non-electronically.  This e-mail
may be confidential, legally privileged or otherwise protected
by law.  Unauthorised disclosure or copying of any or all of it
may be unlawful. If you receive this e-mail in error please notify
the sender and delete the message

**********************************************************************

Re: Can a servlet call another servlet to receive it's XML data inorder to sent it to XSLT processor?

Posted by Bap <li...@a1.org.uk>.
Ganasen Gounden wrote:

> Hello
>
> I have a XMLservlet() that is called from the browser with certain parameters. It returns a set of XML data that is transformed to HTML using an XSLT style sheet on the client side browser(ie5).
>
> Because not all users browsers have this capability yet, I want to try using XALAN parsers to transform this xml data on the server side (Tomcat 3.2) to return html code to the browser.
>
> As my knowldege on servlets are limited I would like some guidlines or preferably some sample code on how to do this:
>
> ie I would like the browser to call a JSP or another Servlet program to receive the paramters from the browser, call the XMLservlet with these parameters, receive the xmldata from the XMLServlet and parse it to the Xalan parsers for processing with the appropriate style sheet and then return the HTML result to the client browser.
>
> Your help is appreciated.
>
> Regards

Have you looked at Cocoon (XSP) at http://xml.apache.org/cocoon

Bap