I don't see what Ajax has to do with this... It sounds more like an HTTP caching issue. Cree, if you do a page refresh, is the image updated correctly? I haven't used the JFreeChart result, but maybe it's not setting the right cache control headers.

L.

Randy Burgess wrote:
Ajax is text only so you can't use it with an image type.

Regards,
Randy Burgess
Sr. Software Architect
D5 Systems, LLC


From: cree <[EMAIL PROTECTED]>
Reply-To: Struts Users Mailing List <user@struts.apache.org>
Date: Wed, 30 Jul 2008 12:14:02 -0700 (PDT)
To: <user@struts.apache.org>
Subject: Struts 2 And JFreeChart


Hello Everyone,

Got a quick question regarding the streaming of a JFreeChart (or any image)
and how to be able to handle it on a jsp.  I have create a servlet that will
stream out an image to the jsp using a syntax similar to (in my struts.xml):

<action name="testChart"
class="TestBarChart">
<result name="success" type="chart">
350
300
</result>
</action>

So if I, in my html, created an img tag such that <img
src="testChart.action"/ , it will correctly create the chart.  My problem
arises when I am using it under a dynamic context.  For example, if
initially I submit a form button (theme="ajax" targets="divTarget") then it
would render new data and an initial image.

If I submit the form again with different user input the data would change
but the image is still the same. I assume it is the same buffered image that
it first loaded, but the action itself will never get reloaded.  The action
would not get executed at all.

My question is whether there is a way I can manually force the img tag to
invoke the action itself.

Thanks for any input
--
View this message in context:
http://www.nabble.com/Struts-2-And-JFreeChart-tp18740589p18740589.html
Sent from the Struts - User mailing list archive at Nabble.com.


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




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

Reply via email to