Return-Path: Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 44735 invoked from network); 15 Sep 2000 19:14:16 -0000 Received: from sm2.texas.rr.com (HELO Mail.austin.rr.com) (24.93.35.55) by locus.apache.org with SMTP; 15 Sep 2000 19:14:16 -0000 Received: from [24.167.74.110] ([24.167.74.110]) by Mail.austin.rr.com with Microsoft SMTPSVC(5.5.1877.537.53); Fri, 15 Sep 2000 14:11:40 -0500 User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.02.2022 Date: Fri, 15 Sep 2000 14:14:14 -0500 Subject: Re: Micke! Re: calling servlet from XML ? From: Michael Engelhart To: Message-ID: In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N 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