public abstract class ReportServletJSP
extends com.inet.report.servlets.ReportPluginServlet
implements javax.servlet.jsp.HttpJspPage
props
. The descending JSP servlet can read these
parameters and create a HTML page.Constructor and Description |
---|
ReportServletJSP()
Initialize a ReportServletJSP object.
|
Modifier and Type | Method and Description |
---|---|
void |
doWriteHtmlPage(java.util.Properties props,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
This method sets up a properties object for you
and calls _jspService(req, res) which is the HTML page you have written
translated into java code.
|
void |
init(javax.servlet.ServletConfig config)
Initialize the servlet and logs the initialization.
|
void |
jspDestroy()
Method will be called when the JSP container attempts to destroy the JSP servlet.
|
void |
jspInit()
Method will be called when the JSP container initialize the JSP servlet.
|
public ReportServletJSP()
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
init
in class com.inet.report.servlets.ReportPluginServlet
config
- servlet configuration informationjavax.servlet.ServletException
- if an exception occurs that interrupts the servlet's normal operationpublic void jspInit()
public void jspDestroy()
public void doWriteHtmlPage(java.util.Properties props, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws java.io.IOException, javax.servlet.ServletException
<HTML>
<HEAD><TITLE>My Report Viewer</TITLE></HEAD>
<BODY bgcolor="C6C6C6">
<applet code="com.inet.viewer.ViewerApplet"
codebase=<%=props.getProperty("http_server_port") + "/client" %> id=ReportViewer width=100% height=100%>
<param name=ReportName value=<%=props.getProperty("report") %> >
<param name=HasGroupTree value=false>
<param name=HasExportButton value=true>
<param name=HasRefreshButton value=true>
<param name=HasPrintButton value=true>
<param name=HasLoggingEnabled value=true>
<param name=HasTextSearchControls value=true>
<param name=Archive value=<%=props.getProperty("http_server_port") +
"/core/ReportViewer.jar"%> >
</applet>
</BODY>
</HTML>
Note that within your JSP all checkProperties callbacks are available. For example:
public void checkProperties (Engine engine, Properties prop, Object serviceRequest) {
// examine parameter fields
Fields df = engine.getFields();
for(int i=0; i<df.getPromptVarFieldsCount(); i++) {
PromptField f = (PromptField)df.getPromptVarField(i);
System.out.println("PromptField# " + i + " : " +f.getName() + " " + f.getPromptValue());
}
// examine formula fields
for(int i=0; i<df.getFormulaFieldsCount(); i++) {
FormulaField f = (FormulaField) df.getFormulaField(i);
System.out.println("FormulaField# " + i + " : " +f.getName() + " " + f.getFormula());
}
}
doWriteHtmlPage
in class com.inet.report.servlets.ReportPluginServlet
props
- Report properties to use when creating the HTML pagereq
- HttpServletRequest to use for the call to _jspServiceres
- HttpServletResponse to use for the call to _jspServicejava.io.IOException
- if an exception occurs that interrupts the servlet's normal operationjavax.servlet.ServletException
- if there is a problem calling HttpJspPage._jspService(HttpServletRequest, HttpServletResponse)
HttpJspPage._jspService(HttpServletRequest, HttpServletResponse)
Copyright © 1999-2020 by i-net software GmbH