JFreeChart with Servlet/JSP

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

JFreeChart with Servlet/JSP

Post by rajkanth » Thu Oct 11, 2001 4:56 pm

Hi,

How to generate server side chart using JFreeChart. I would appreciate if some one could give me clue to do it using Servlet or JSP.

Thanks in advance,

rajkanth

Randy Kemp

RE: JFreeChart with Servlet/JSP

Post by Randy Kemp » Fri Oct 12, 2001 3:51 pm

I posed the question on JSP, but there is an excellent servlet war file package at http://www.jrefinery.com/jfreechart/index.html.
To use the servlet by itself, and not with the war package, you need to modify this in an import line (forgot which, but here is code)
and use this as a prototype.

//package com.jrefinery.chart.demo;

import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.awt.image.*;
import java.io.*;
import java.util.*;
import javax.swing.*;

import javax.servlet.*;
import javax.servlet.http.*;

import com.sun.image.codec.jpeg.*;

import com.jrefinery.chart.demo.*;
import com.jrefinery.chart.*;
import com.jrefinery.chart.data.*;
import com.jrefinery.chart.ui.*;
import com.jrefinery.util.ui.*;

Now someone may ask: Where can I get a JSP/servlet engine to play with?
answer:
Resin -- www.caucho.com -- free for development
Tomcat -- jakarta.apache.org -- I recommend Tomcat 4. and tutorials at
http://www.onjava.com/pub/ct/33
Lite Web Server -- http://www.gefionsoftware.com/LiteWebServer/

If you later want to get into EJB, check out www.jboss.org

David Gilbert

RE: JFreeChart with Servlet/JSP

Post by David Gilbert » Fri Oct 12, 2001 8:11 pm

Thanks for the post Randy. Servlets and JSP are outside my area of expertise although I can understand why there is a lot of interest in using JFreeChart in this way.

If anyone would care to write up some documentation for this I'd be happy to post it on the website.

Regards,

DG.

Locked