We have used CeWolf, and it is quite good, but based on the last release
date and the fact that the newer versions of JFreeChart seem to be not
supported, I wonder if the CeWolf project is moribund. Another solution
I used several years ago is to store the JFreeChart 'Chart' object in the
Session, and then use a special Servlet to get the Chart object and to
output a png or jpg image object. An image referenced in a page with an
href always causes a separate request cycle to serve the content.
Although this required a separate servlet, there were probably only 10
lines of code in it. Another solution is to output the image in svg
format or to output it in a binary byte stream as a multi-part request.
The really nice feature of CeWolf, which none of these other methods have
is that CeWolf had image-mapped tool tips to give the coordinates of
important features. I wonder if this project is still alive in any
meaningful way. (I notice that its creator is a Struts contributor).
- Ray Clough
----- Original Message -----
From: "Peng Tuck Kwok"
To: "Struts Users Mailing List"
Subject: Re: S2 and JFreeChart (showing images)
Date: Fri, 6 Jul 2007 17:30:23 +0800
hmm page not updated in a while. Maybe not worth if that's the case.
On 7/6/07, Peng Tuck Kwok wrote:
>
> You could possibly use Cewolf, which provides a set of tag
libraries that
> you can you to display a chart in your jsp page. Link is
> here.
> I've played with it a while back and it did seem easy to get a
simple chart
> up. Worth a look if you ask me.
>
> On 7/5/07, Andreja wrote:
> >
> > I have an action where I create graph(s), and I need to display
them
> > in the page. It is ArrayList that I need to show, but for
> > the start I will try to display only one graph.
> >
> >
> > Action code goes like this:
> >
> > public class ChartDisplayAction () {
> > ...
> > execute() {
> > HttpSession session = servletRequest.getSession();
> > JFreeChart mygraph = ...creating graph...
> > BufferedImage myBuffered = mygraph.createBufferedImage (600,
400);
> > session.setAttribute("myBuffered", myBuffered);
> > }
> > ...
> > }
> >
> >
> > .jsp page code:
> >
> > [IMAGE]" border=0
> > usemap="#imageMap">
> >
> > Obviously, I am making the mistake here (most probably when I am
> > trying to put myBuffered in session scope), but chart that I want
to
> > display is not in file, it is in a stream, and there must be a
way to
> > pass the stream to .jsp page. How do I do that?
> >
> > Thanks!
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
- Ray Clough
[EMAIL PROTECTED]