How to use the JFreeChart Servlet ?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Bryan

Re: How to use the JFreeChart Servlet ?

Post by Bryan » Tue Jul 30, 2002 12:13 pm

Susan

1. Cool, thanks again for picking up on some of the errors.

2.
a. There are some JSP examples for JFreeChart, but I am not conversant with with them.
b. The html are simple front ends for the demo servlets, this is to keep it simple and focus on the chart servlet. Yep some of these could and in real life should be done as either servlets or jsp pages. (the demo comes straight from an app I support, which has a servlet as the front end. http://coyote.aad.gov.au/marine/servlet/DataAvailable )
c. If you have a specific question or part you do not understand let me know. The idea is to provide an example base class for extending to provide a chart servlet. The base servlet deals with lots of common items such as size, image type etc parameters, thus extending is a case of overriding either
a. generateSQL(HttpServletRequest request) and optionally
modifyChart(JFreeChart chart, HttpServletRequest request) in the easy case, or
b. JFreeChart createChart(HttpServletRequest request) if the default charts are not adequate.

3. You do not need extract the zip file in the lib directory. It should be happy just just living in the lib directory. NB I do not know if it matters but I rename to oracle12.jar.

Bryan

Guido Laures

Re: How to use the JFreeChart Servlet ?

Post by Guido Laures » Tue Jul 30, 2002 12:24 pm

Hello all,

you can find all information (including tutorials and examples) you need about JFreeChart/JSP on the Cewolf project site. Cewolf implements a tag library for chart generation based on JFreeChart.

Visit: http://cewolf.sourceforge.net

And of course: it is free (LGPL)

Regards,
Guido

David Gilbert

Re: How to use the JFreeChart Servlet ?

Post by David Gilbert » Tue Jul 30, 2002 4:26 pm

A BIG THANKS from me to Bryan and Guido for the work they are doing with JFreeChart in servlets and JSP. This is an area in which I have little expertise, so the assistance is very much appreciated...

Regards,

DG.

Susan

Re: How to use the JFreeChart Servlet ?

Post by Susan » Wed Jul 31, 2002 3:23 am

A big thank you to all of you. This is a great contribution and the responses to queries is simple applausable.

Bryan,
I got the sample to work after renaming the file to a .jar extension. Many thanks. :-)

Guido,
I will be trying out the sample from Cewolf project as I am interested in using JSPs. I can still do a select from the database using EJBs right and display the charts on the web?

Thanks all!
Susan

Guido Laures

Re: How to use the JFreeChart Servlet ?

Post by Guido Laures » Thu Aug 01, 2002 8:17 am

Hi Susan,

of course you can.
You just need to provide a class which implements a simple interface that is used to feed the chart with data. This can serve as the bridge between the chart generation and the EJB backend.
In further versions it will even be possible to reference an EJB via JSP tags directly so that no extra coding will be needed. But this is scheduled for autumn.

Regards,
Guido

Susan

Re: How to use the JFreeChart Servlet ?

Post by Susan » Tue Aug 13, 2002 6:55 am

Thanks Guido. I have managed to retrieve data from a bean and display it in the jsp.

Looking forward to the part whereby we can reference an EJB via JSP tags directly without extra coding.

Excellent job done. Keep it up. Thanks!

Best regards,
Susan

Locked