org.dbforms.servlets
Class JasperReportServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.dbforms.servlets.base.AbstractServletBase
              extended by org.dbforms.servlets.reports.AbstractReportServlet
                  extended by org.dbforms.servlets.JasperReportServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class JasperReportServlet
extends AbstractReportServlet

This servlet starts a JasperReport.

Author:
Henner Kollmann
See Also:
Serialized Form

Constructor Summary
JasperReportServlet()
           
 
Method Summary
protected  void compileReport(ServletContext context, String reportFile)
          DOCUMENT ME!
protected  String getReportFileExtension()
          DOCUMENT ME!
protected  ReportWriter processReport(String reportFileFullName, AbstractJRDataSource dataSource, ServletContext context, HttpServletRequest request, HttpServletResponse response)
          generates a report.
 
Methods inherited from class org.dbforms.servlets.reports.AbstractReportServlet
handleException, init, process
 
Methods inherited from class org.dbforms.servlets.base.AbstractServletBase
doGet, doPost, sendErrorMessage
 
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, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JasperReportServlet

public JasperReportServlet()
Method Detail

getReportFileExtension

protected String getReportFileExtension()
DOCUMENT ME!

Specified by:
getReportFileExtension in class AbstractReportServlet
Returns:
DOCUMENT ME!

compileReport

protected void compileReport(ServletContext context,
                             String reportFile)
                      throws Exception
DOCUMENT ME!

Overrides:
compileReport in class AbstractReportServlet
Parameters:
context - DOCUMENT ME!
reportFile - DOCUMENT ME!
Throws:
Exception - DOCUMENT ME!

processReport

protected ReportWriter processReport(String reportFileFullName,
                                     AbstractJRDataSource dataSource,
                                     ServletContext context,
                                     HttpServletRequest request,
                                     HttpServletResponse response)
generates a report.

Specified by:
processReport in class AbstractReportServlet
Parameters:
reportFileFullName - filename of report to process reportHTTPServletRequest generated by getReportFile! getReportFile should be called before fetching data, so that error handling of report not found e.g. could be processed first!
dataSource - data for the report
context - ServletContext
request - HTTPServletRequest
response - HTTPServletResponse
Returns:
DOCUMENT ME!


Copyright © 2002-2006 DbForms. All Rights Reserved.