|
i-net Clear Reports | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.inet.report.ReportServlet
com.inet.report.ReportServletJSP
public abstract class ReportServletJSP
This class implements the communication between the client that
created the requested report and the engine. The ReportServletJSP
is meant to be used as a parent for JSP pages which want to make
use of i-net Clear Reports. It implements a method that reads
parameters from the request and stores them in the variable
props. The descending JSP servlet can read these
parameters and create a HTML page.
Here's how a JSP is used to generate a report:
| Constructor Summary | |
|---|---|
ReportServletJSP()
Initialize a ReportServletJSP object. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class com.inet.report.ReportServlet |
|---|
afterPropertiesStoredHook, checkHtmlPageProperties, checkProperties, checkProperties, checkProperties, checkProperties, destroy, doExecRequest, doFilter, service, setPropertiesChecker |
| Constructor Detail |
|---|
public ReportServletJSP()
ReportServlet.ReportServlet()| Method Detail |
|---|
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
init in class ReportServletconfig - servlet configuration information
javax.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 ReportServletprops - Report properties to use when creating the HTML pagereq - HttpServletRequest to use for the call to _jspServiceres - HttpServletResponse to use for the call to _jspService
java.io.IOException - if an exception occurs that interrupts the servlet's normal operation
javax.servlet.ServletException - if there is a problem calling HttpJspPage._jspService(HttpServletRequest, HttpServletResponse)HttpJspPage._jspService(HttpServletRequest, HttpServletResponse)
|
i-net Clear Reports | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||