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:

<p>some text here</p>
<img src="/servlet/ImageServlet?id=10989">
<p>some more text here</p>

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to