What if your website is built under apache and now wants to use jsp? You can use jsp engines that support apache (such as resin, tomcat, and jser. This section describes how to configure apache + resin to enable apache to support jsp.
1. install and configure apache and resin separately so that both of them can run normally.
The installation paths of apache and resin are as follows: c: apache and c: esin1.1.
Ii. Configure apache
Configure apache to load the resin jsp Engine. Add the following command line to the configuration file c: apacheconfhttp. conf.
LoadModule aucho_module
3. Configure resin
Modify the configuration file (c: esinconfesin. conf) of rsein and specify the working directory of jsp in apache. Modify as follows:
<Caucho.com>
<Http-server app-dir = c:/apache/htdocs>
<Servlet-mapping rl-pattern =/servlets/* servlet-name = invoker/>
<Servlet-mapping rl-pattern = *. xtp ervlet-name = com. caucho. jsp. XtpServlet/>
<Servlet-mapping rl-pattern = *. jsp servlet-name = com. caucho. jsp. JspServlet/>
</Http-server>
</Caucho.com>
Iv. Test
After completing the preceding steps, apache supports jsp and servlet. run apache and start the resin jsp Engine (run c: esin1.1insrun.exe ).
The jsp running directory is under apache htdocs, while the servlet running directory is "c: apachehtdocsWeb-infclass"
Put a jsp file (test. jsp) under the apache htdocs directory.
Test. jsp is as follows:
<% @ Page language = java?>
2 + 2 = <% = 2 + 2%>
View http: // localhost: port/test. jsp. You will see the result 2 + 2 = 4.
Note: In the debugging environment win98 + apache_1_3_12 + resin1.1, the port is the WEB server port number.