org.dbforms.servlets.reports
Class AbstractReportServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.dbforms.servlets.base.AbstractServletBase
org.dbforms.servlets.reports.AbstractReportServlet
- All Implemented Interfaces:
- Serializable, Servlet, ServletConfig
- Direct Known Subclasses:
- AbstractLineReportServlet, JasperReportServlet
public abstract class AbstractReportServlet
- extends AbstractServletBase
This is the abstract base class for generating reports.
- Author:
- Henner Kollmann
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractReportServlet
public AbstractReportServlet()
init
public void init()
throws ServletException
- Initialize this servlet.
- Overrides:
init
in class AbstractServletBase
- Throws:
ServletException
- if we cannot configure ourselves correctly
processReport
protected abstract ReportWriter processReport(String reportFileFullName,
AbstractJRDataSource dataSource,
ServletContext context,
HttpServletRequest request,
HttpServletResponse response)
- generates a report.
- 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 reportcontext
- ServletContextrequest
- HTTPServletRequestresponse
- HTTPServletResponse
getReportFileExtension
protected abstract String getReportFileExtension()
handleException
protected final void handleException(HttpServletRequest request,
HttpServletResponse response,
Exception e)
compileReport
protected void compileReport(ServletContext context,
String reportFile)
throws Exception
- Throws:
Exception
process
protected void process(HttpServletRequest request,
HttpServletResponse response)
- generates a report from request. Tries to get data from DbForms.
- Specified by:
process
in class AbstractServletBase
- Parameters:
request
- HTTPServletRequestresponse
- HTTPServletResponse
Copyright © 2002-2006 DbForms. All Rights Reserved.