Get Digby, get anything !

Digby is the easiest way to use your BlackBerry to find, browse and buy popular, name brand products from premier vendors on the web. Digby eliminates the challenges of surfing web sites not designed for mobile devices like the BlackBerry. Our easy-to-use graphical interface makes browsing intuitive and provides quick access to products in categories [...]

Displaying dynamic charts in a web page (using JFreeChart & JSP)

This code snippet will tell you how to create a chart (using JFreeChart) on the fly and displaying it in a webpage.
getChart.jsp
<%@ page import=“java.io.*” %>
<%@ page import=“org.jfree.chart.JFreeChart” %>
<%@ page import=“org.jfree.chart.ChartUtilities” %>
<%
 try
 {
  File image = File.createTempFile(“image”, “tmp”);
  
  // Assume that we have the chart
  ChartUtilities.saveChartAsPNG(image, chart, 500, 300);
  
  FileInputStream fileInStream = new FileInputStream(image);
  OutputStream outStream = response.getOutputStream();

  long fileLength;
  byte[] byteStream;
  
  fileLength [...]