First, thank you for the answer!

Are you accessing the session in the S2 way
by implementing sessionaware and
having a setSession method?

No, I didn't do that, because I don't understand how to implement
setSession method.

   public void setSession(Map arg0) {
        ???
   }

How does Map realte to HttpSession field, I don't know.

On jsp page I have several (30-40) pictures that I would like to show
dynamically (pictures are in memory, not in files on disk), and I use
jsp code that looks like this:

<s:iterator value="generatedCharts" status="cnt">
        <s:url id="url" action="GraphsServer" method="showGraph">
                <s:param name="id">${cnt.index}</s:param>
        </s:url>
        <img src="${url}">
</s:iterator>

(it renders HTML like this: <img src="/GraphsServer!showGraph.action?id=0"> )

In action, there is a field:   ArrayField<JFreeChart> generatedCharts,
and showGraph method takes the "id" filed to send output stream:

os = servletResponse.getOutputStream();
ChartUtilities.writeChartAsPNG(os,
generatedCharts.get(Integer.valueOf(id)), 600, 400);
os.flush();

Each time .getOutputStream() is called, the following exception happens:

java.lang.IllegalStateException: getOutputStream() has already been
called for this response

Is there a way to do this?

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to