|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.GenericServlet | +--javax.servlet.http.HttpServlet | +--com.jrefinery.report.ext.demo.JFreeReportPngServlet
A Sample HttpServlet to show how JFreeReports can be used to generate PNG content in a webbased environment.
The servlet expects a page
parameter to be set. This parameter
must be greater or equal to one and must fit the report's paginated pages.
This servlet is not intended to be a stand-alone solution, it should be
used in conjunction with a wrapper page, which uses <IMG> tags to link
to this servlet.
POST and GET are handled equal, so it does not matter whether you POST or GET the URL for this servlet.
Constructor Summary | |
JFreeReportPngServlet()
|
Method Summary | |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles the GET method for the servlet. |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles the POST method for the request. |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JFreeReportPngServlet()
Method Detail |
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doGet
in class javax.servlet.http.HttpServlet
request
- the http request object.response
- the http response object.
javax.servlet.ServletException
- if an error occured, which could not be handled internaly.
java.io.IOException
- if writing the generated contents failed.public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
The generated PageStateList is stored in the session so that it can be reused
for later calls. The page
parameter must be set to a valid value,
or the page generation will fail.
The page parameter is required, must be a valid positive integer. The first page is '0'.
doPost
in class javax.servlet.http.HttpServlet
request
- the http request object.response
- the http response object.
javax.servlet.ServletException
- if an error occured, which could not be handled internaly.
java.io.IOException
- if writing the generated contents failed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |