cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Engelhart <mengelh...@earthtrip.com>
Subject Re: Micke! Re: calling servlet from XML ?
Date Fri, 15 Sep 2000 19:14:14 GMT
Eliza.Khosrova@tminus10.com wrote:

> Hello Mike,
> 
> Thanks for the reply.  I did see the stuff you mentioned in the archive but
> I was hoping to see if it's feasible to control the call from the page
> itself (equivalent to server-side includes we do in HTML) for the following
> reason:
> We have XML pages in our site that contain static and dynamic data.
> Some pages may only need to call one servlet to get dynamic data and embed
> it whereas some page require calling different servlets to get different
> set of dynamic information.  With the approach you mentioned, I have to
> create
> another servlet to handle these situations and it's not clean.   That's
> what I thought the clean way would be to simply acces the XML page itself
> and have the
> XML handle the calls to servlet per its needs
> 
> Anyone has run into this problem?  Any other suggestions? etc.

Unfortunately, I'm not exactly sure what you're trying to do but can't you
do this:

A request comes to a servlet for some dynamic XML generation.  This servlet
figures out which static XML you need and puts the URL to the static page as
well as the dynamically generated XML into the request object and passes the
request object to the XSP which then uses an "include" for the static page
and embeds the dynamic data both of which were passed to it by the
RequestDispatcher.   This also means you only need one XSP since it doesn't
really matter what the data is.  The XSL sheet will determine how's it's
displayed.  Sorry if I'm way off but that's how i'd do it.

MIke


Mime
View raw message