Web server is a resin server, you need to be aware of the configuration of XML. XML server configuration of the resin server is similar to the configuration of the Tomcat server.
1. For the first time in my own mind, I take for granted the Resin-web.xml configuration Servelet under Resin-pro-3.1.4a\webapps\resin-doc\web-inf, Because I see a lot of the statements in this file are like configuration Servlets. Start the server so that the resulting result is, of course, a background prompt error,
{resin-6} web-inf/resin-web.xml:22: ' XXX ' is a known servlet. Servlets belong in the Classpath,。。。。
2. Realize that the Resin-web.xml configuration is wrong, then change to a location, configure the Web. XML under Resin-pro-3.1.4a\webapps\root\web-inf,
The contents of the configuration are
<servlet-name>DisplayChart</servlet-name>
<servlet-class>org.jfree.chart.servlet.DisplayChart</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>DisplayChart</servlet-name>
<url-pattern>/DisplayChart</url-pattern>
</servlet-mapping>
Start the server, the background is also prompt {resin-6} web-inf/resin-web.xml:22: ' XXX ' is a known servlet. Servlets belongin the Classpath, error
3. Search the Internet, there is a blog http://blog.sina.com.cn/s/blog_48476d9b010001e3.html
Tip You should configure the Resin-pro-3.1.4a\webapps\root\web-inf Web. XML under this directory, servlet is
<servlet servlet-name= ' displaychart ' servlet-class= ' Org.jfree.chart.servlet.DisplayChart '/>
<servlet-mapping url-pattern= '/displaychart ' servlet-name= ' Displaychart '/>
It still finds that Org.jfree.chart.servlet.DisplayChart class is not found.
[17:51:33.688] {resin-7} web-inf/resin-web.xml:22: ' Org.jfree.chart.servlet.Disp
Laychart ' is a known servlet. Servlets belong in the classpath, often in WE
B-inf/classes.
4, the last trick is to extract Jfreechart-1.0.14.jar, the org folder to the web-inf/classes directory, Such files are included in the Org.jfree.chart.servlet.DisplayChart,
Start the server, you can open the Web page, work is normal, the picture is also displayed.
But one of the problems is that the backstage has been constantly issuing hints
[17:51:33.688] {resin-7} web-inf/resin-web.xml:22: ' Org.jfree.chart.servlet.DisplayChart ' is not a known servlet. Servlets belong in the classpath, often in web-inf/classes.
The problem needs to be solved.
4. Subsequent inspections revealed that the
Resin-pro-3.1.4a\webapps\resin-doc\web-inf under Resin-web.xml configuration Servelet, did not change back to the original (that is, no removal of the servlet content of the first step configuration)
<servlet-name>DisplayChart</servlet-name>
<servlet-class>org.jfree.chart.servlet.DisplayChart</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>DisplayChart</servlet-name>
<url-pattern>/DisplayChart</url-pattern>
</servlet-mapping>
After you delete the above content, the background runs normally.
Jfreechart the picture is displayed on the JSP page (the Servelet configuration of the resin server is critical) (the image is memory only)