The web viewer is added to a JSP page with the Stimulsoft tag library, after registering its servlets in web.xml.

Register the servlets. In web.xml:
<servlet>
    <servlet-name>StimulsoftResource</servlet-name>
    <servlet-class>com.stimulsoft.web.servlet.StiWebResourceServlet</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>StimulsoftResource</servlet-name>
    <url-pattern>/stimulsoft_web_resource/*</url-pattern>
</servlet-mapping>
<!-- plus StiWebViewerActionServlet mapped to /stimulsoft_webviewer_action -->
Render a report and place the viewer tag. In the JSP:
StiReport report = StiSerializeManager.deserializeReport(new File(reportPath));
report.render();
StiWebViewerOptions options = new StiWebViewerOptions();
pageContext.setAttribute("report", report);
pageContext.setAttribute("options", options);
// <stiwebviewer:webviewer report="${report}" options="${options}" />

How it works. The JSP renders the report server-side and hands it to the viewer tag, while the servlets serve resources and process viewer requests.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.