Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 437 invoked from network); 7 Sep 2005 14:44:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Sep 2005 14:44:29 -0000 Received: (qmail 69583 invoked by uid 500); 7 Sep 2005 14:44:23 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 69518 invoked by uid 500); 7 Sep 2005 14:44:23 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 69505 invoked by uid 99); 7 Sep 2005 14:44:22 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Sep 2005 07:44:22 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of dharmapurikar@gmail.com designates 64.233.162.197 as permitted sender) Received: from [64.233.162.197] (HELO zproxy.gmail.com) (64.233.162.197) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Sep 2005 07:44:34 -0700 Received: by zproxy.gmail.com with SMTP id m7so954769nzf for ; Wed, 07 Sep 2005 07:44:20 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:mime-version:content-type:content-transfer-encoding:x-mailer:in-reply-to:thread-index:x-mimeole:message-id; b=gX3DaWyjdutudk/L6FF0XVSyc6dwQf+YeQdnm3Ym8lI7vt6Fzxt1reozKoMCxnUQbrXrjoLHhVmO+BBu6D2Xmd20pyvH89EEpwIxFQBJtqH3+dUJhlboXrcFA/2KeeTt4TbScnZMdsyhVJeGdMXcF6dkL6Rj+FbVryLSw++JPHs= Received: by 10.36.32.16 with SMTP id f16mr6727706nzf; Wed, 07 Sep 2005 07:44:20 -0700 (PDT) Received: from dexter ( [202.63.116.116]) by mx.gmail.com with ESMTP id 6sm7443221nzn.2005.09.07.07.44.17; Wed, 07 Sep 2005 07:44:20 -0700 (PDT) From: "Sachin Dharmapurikar" To: Subject: RE: How to Share objects with Servlets in Same container Date: Wed, 7 Sep 2005 20:14:05 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-Reply-To: <431EF565.1010201@lojjic.net> Thread-Index: AcWztlfl7+EgRuFFTOaneHxNh93trgAAj2aw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Message-ID: <431efcc4.66198392.2f12.fffffe07@mx.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Jason Johnston Wrote: > > There may be other ways to do this that I don't know about, but putting > the bean on the session and issuing a redirect to ImageServlet would > definitely work (I've done similar things running Cocoon and ColdFusion > together). Note that the two servlets (CocoonServlet and ImageServlet) > will have to be running in the same servlet container to share session > data. > > Also, I'm not sure what exactly your ImageServlet involves, but Cocoon > has facilities for generating PNG/JPG images from SVG documents, so if > you wanted to try porting it over then you'd have a fully-Cocoon app and > wouldn't have to worry about passing stuff between servlets. Just a > thought. > First I would like to thanks for your prompt response and detailed advice. In my case, as a result of user inputs we display a report page to the user. This report page contains some dynamic text fetched/processed from database and based on some database information we also have some chart generated. This chart generation info I am planning to put into session (as we discussed earlier). Now as HTML text and images cannot be sent in only one response, we just embed REPORT PAGE SAMPLE:

some text here

some more text here

Now for each image in report this id is taken as input by the image servlet and by retrieving its data from session it can generate the chart based on that data. For this we use some java tool. I am not sure whether we can generate charts by XML; I don't want to invest my efforts on writing the chart API. As you said very correctly, to make this solution workable both ImageServlet and cocoon (servlet) should be in the same container. >>From what I've seen XSP is being phased out (or at least discouraged for >most uses) now that we have better ways (Control Flow) to handle >processing. I didn't understood one thing, if XSP is outdated, do I need to serialize the Java program output again and again to XML if XSP is not there? Because AFAIK in cocoon the output of one stage to another goes in XML format. Do you have to say something on this? Please suggest me something... -Sachin --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org