public class ChartServlet
extends javax.servlet.http.HttpServlet
This class requires a javax.servlet
Images are rendered using 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)).
| Constructor and Description |
|---|
ChartServlet() |
| Modifier and Type | Method and Description |
|---|---|
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() |
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, serviceprotected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
doGet in class javax.servlet.http.HttpServletrequest - 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 clientjavax.servlet.ServletExceptionIOExceptionprotected Chart getChart(javax.servlet.http.HttpServletRequest request)
request - an HttpServletRequest object that contains
the request the client has made of the servletJspBeanpublic void init()
throws javax.servlet.ServletException
init in class javax.servlet.GenericServletjavax.servlet.ServletExceptionCopyright © 1970-2015 Rogue Wave Software
Built March 24 2015.