About Crystal Reports The Deployment of Eclipse TomcatPlugin in the Department of Crystal Reports. Prerequisites Tomcat runs normally. First, the crystal report 10 is installed by default. Install the directory ..cr10 / crystal_report_java_components / windows / novm Install.exe (Java Components) file. Second, create a crystal report template to see the Crystal Report User Manual. The selection of the data source is required for the report that needs to be produced. Save File "Report1.rpt" three, deploy on Eclipse 1. New New-> Tomcat Project. Project Name is "Report", specify the path of the project. The file directory is as follows:
2. Due to the default installation of the crystal report.
1 This directory C: / Program File / Common file / crystal decision / 2.5 / java / lib is introduced in the project. Jar file in the subdirectory.
Then, the above-described file import to the lib file under the project folder.
And connect it to the database. JAR file copy to this directory
as the picture shows:
2 Copy the directory C: / Program Files / Common files / crystal decision / 2.5 CrystalReportViewers10 Copy to the project file name /
3 WEB-INF / Establishing Web.xml file under the project folder, the content is as follows:
Xml Version = "1.0" encoding = "ISO-8859-1"?>
Public "- // Sun microsystems, Inc.//dtd Web Application 2.3 // en"
"http://java.sun.com/dtd/web-app_2_3.dtd">
context-param>
web-app>
4 will C: / Program Files / Common Files / Crystal Decisions / 2.5 / Java /
CrystalReportEngine-config.xml file copy to
Project file name / Web-inf / class, and modify it, modify it:
xml
Version = "1.0" eNCoding = "UTF-8"?>
Note
5 Copy the previous report file Report1.rpt to the project file name / Web-INF
6 Establish a Basic.jsp file in the project file name /
<% @ page contenttype = "text / html; charSet = GB2312"%> <% @ page import =
"com.crystaldecisions.reports.reportEngineInterface. *"%>
<% @ Page Import =
"com.crystaldecisions.report.web.viewer. *"%>
<%
CrystalReportViewer CRV = New CrystalReportViewer ();
JPEREPORTSOURCEFACTORY JRSF = New JpereportsourceFactory ();
CRV.SetReportsource
Jrsf.createReportsource ("test.rpt", request.getlocale ()));
CRV.ProcesshttpRequest (Request, Response, Application, Null);
%>
7 Start the Tomcat browser into http: // localhost: 8080 / report / Basic.jsp
The display is as follows: