You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Struts2 Fan <st...@gmail.com> on 2007/08/03 11:07:03 UTC

how to Display a chart created by jfreechart-plugin in a jsp?

Hi all,

http://struts.apache.org/2.x/docs/jfreechart-plugin.html

In this page it just gives an example to make the action return a chart. My
question is how can I display it on a part of a jsp? 

Any help will be appreciated...
-- 
View this message in context: http://www.nabble.com/how-to-Display-a-chart-created-by-jfreechart-plugin-in-a-jsp--tf4211390.html#a11979863
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: how to Display a chart created by jfreechart-plugin in a jsp?

Posted by Struts2 Fan <st...@gmail.com>.
Thanks for the reply but there must be an easier way. If thats the way the
plugin will not be easy to use. 


Amit Sharma-10 wrote:
> 
> HI
> 
> You can store the image created by jfreechart at some temporary location,
> and then get the image from this location while displaying.
> 
> 
-- 
View this message in context: http://www.nabble.com/how-to-Display-a-chart-created-by-jfreechart-plugin-in-a-jsp--tf4211390.html#a11980475
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: how to Display a chart created by jfreechart-plugin in a jsp?

Posted by Amit Sharma <am...@gmail.com>.
HI

You can store the image created by jfreechart at some temporary location,
and then get the image from this location while displaying.


On 03/08/07, Struts2 Fan <st...@gmail.com> wrote:
>
>
> Hi all,
>
> http://struts.apache.org/2.x/docs/jfreechart-plugin.html
>
> In this page it just gives an example to make the action return a chart.
> My
> question is how can I display it on a part of a jsp?
>
> Any help will be appreciated...
> --
> View this message in context:
> http://www.nabble.com/how-to-Display-a-chart-created-by-jfreechart-plugin-in-a-jsp--tf4211390.html#a11979863
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: how to Display a chart created by jfreechart-plugin in a jsp?

Posted by Laurie Harper <la...@holoweb.net>.
Struts2 Fan wrote:
> Hi all,
> 
> http://struts.apache.org/2.x/docs/jfreechart-plugin.html
> 
> In this page it just gives an example to make the action return a chart. My
> question is how can I display it on a part of a jsp? 
> 
> Any help will be appreciated...

As with any resource you want to display in a web page (images, applets, 
etc.), you do so by reference. On the page in which you want to include 
the chart, use an 'img' tag to reference the chart producing action. For 
example, if your chart producing action is named 'chart', your JSP might 
include something like:

     <s:url id='chartUrl' action='chart'>
         <s:param name='chartId'>${chartType}</s:param>
     </s:url>
     <img src='${chartUrl}' />

So, you have one action which serves the page and another that serves 
the chart. Or one action, with two methods or whatever.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org