webwork.view.jasperreports
Class JasperReportViewServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bywebwork.view.jasperreports.JasperReportViewServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class JasperReportViewServlet
extends javax.servlet.http.HttpServlet

Provide a view of a webwork action as a jasper report. The report format will be determined by the format parameter passed in the view definition. This servlet should be deployed to service view requests of the form: <view name>.jr?dataSource=<data source>&format=<format string> Valid report format strings are the following:

It will then look for a compiled report definition of the form <view name>.jasper, run it to the appropriate output format and stream the results as the HTTP response.

See Also:
Serialized Form

Field Summary
static java.lang.String FORMAT_CSV
           
static java.lang.String FORMAT_HTML
           
static java.lang.String FORMAT_PDF
           
static java.lang.String FORMAT_XLS
           
static java.lang.String FORMAT_XML
           
protected static org.apache.commons.logging.Log log
           
 
Constructor Summary
JasperReportViewServlet()
           
 
Method Summary
 void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Service a HTTP request
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, 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
 

Field Detail

log

protected static org.apache.commons.logging.Log log

FORMAT_PDF

public static final java.lang.String FORMAT_PDF
See Also:
Constant Field Values

FORMAT_XML

public static final java.lang.String FORMAT_XML
See Also:
Constant Field Values

FORMAT_HTML

public static final java.lang.String FORMAT_HTML
See Also:
Constant Field Values

FORMAT_XLS

public static final java.lang.String FORMAT_XLS
See Also:
Constant Field Values

FORMAT_CSV

public static final java.lang.String FORMAT_CSV
See Also:
Constant Field Values
Constructor Detail

JasperReportViewServlet

public JasperReportViewServlet()
Method Detail

service

public void service(javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response)
             throws javax.servlet.ServletException
Service a HTTP request

Parameters:
request - the request to service
response - the response to send to the client
Throws:
javax.servlet.ServletException


Copyright © 2001-2003 WebWork All Rights Reserved.