com.imsl.chart
Class ChartServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.imsl.chart.ChartServlet
- All Implemented Interfaces:
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- public class ChartServlet
- extends javax.servlet.http.HttpServlet
The base class for chart servlets.
This class requires a
servlet container.
The behavior of this class depends on the version of the Java runtime being used.
- JDK1.4 or later.
Images are rendered using the standard class
javax.imageio.ImageIO.
This class can be used on a headless server. Java runs in a headless mode if the system property
java.awt.headless=true
.
This class turns off caching in the ImageIO class
(calls javax.imageio.ImageIO.setUseCache(false)
).
- JDK1.3 or earlier.
Since the ImageIO class does not exist in older versions of Java, this class requires the
Java Advanced Imaging Toolkit (JAI)
and a running windowing system to create images. It will not work on a "headless" server.
- See Also:
- Chart Programmer's Guide: Servlets,
Java Servlets,
Java Advanced Imaging Toolkit,
Serialized Form
Method Summary |
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Returns the chart as a PNG image. |
protected Chart |
getChart(javax.servlet.http.HttpServletRequest request)
Returns the chart found in the session saved with the
key "chart"+id, where id is the value of the "id" parameter
in the request. |
void |
init()
|
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
ChartServlet
public ChartServlet()
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
- Returns the chart as a PNG image.
The HTTP request parameter "id" selects the chart.
- Parameters:
request
- an HttpServletRequest
object that contains
the request the client has made of the servletresponse
- an HttpServletResponse
object that contains the
response the servlet sends to the client
- Throws:
javax.servlet.ServletException
IOException
getChart
protected Chart getChart(javax.servlet.http.HttpServletRequest request)
- Returns the chart found in the session saved with the
key "chart"+id, where id is the value of the "id" parameter
in the request.
This method can be overridden to change how charts are
communicated to this servlet.
- Parameters:
request
- an HttpServletRequest
object that contains
the request the client has made of the servlet
- Returns:
- the chart to be rendered or null if the chart cannot be found.
- See Also:
JspBean
init
public void init()
throws javax.servlet.ServletException
- Throws:
javax.servlet.ServletException
Copyright 1970-2006 Visual Numerics, Inc.
Built June 1 2006.