Wiki

How do I set up a servlet engine to run JSP?

LiteSpeed Web Server supports servlet engines/JSP through AJPv13 protocol. Please use the following guidelines to set up the servlet engine:

1. Install an AJPv13 compatible Servlet engine.

You can use any servlet engine as long as it is AJPv13 compatible. (Both Tomcat and Jetty support AJPv13 protocol.) The AJPv13 compatible connector of the servlet engine must be enabled. Please refer to the servlet engine's documentation. Use the servlet engine's built-in HTTP server to test the servlet engine.

2. Make the web application files available to web server.

If the servlet engine runs on a different machine, make a local copy of the web application files. Only the specific web application's directory is needed, not the whole “web-apps” directory. You also need to make sure that the WEB-INF/web.xml file along with all static files and JSP files that the web application will need are on the same machine as well. The Java class files under the WEB-INF directory can be removed. Skip this step if the servlet engine runs on the same machine.

3. If the web application is packed in a .war file, expand it.

4. Define the servlet engine in the WebAdmin console.

Under the External App tab at server level or virtual host level, add a servlet engine. Make sure the Address setting matches the AJP setting in the servlet engine.

5. Create a Java Web App context under the Context tab at the virtual host level.

The context URI should match the URI used by the servlet engine. Set the Location to the directory of the web application. Select the servlet engine external application just created.

6. Set a script handler for JSP files.

Add a script handler in the virtual host-level Script Handler tab. Assign this script handler to the suffix “jsp”. Set the script handler Type to “Servlet Engine” and set the Handler Name to the name of the servlet engine just created.

 
litespeed_wiki/how_do_i_set_up_a_servlet_engine_to_run_jsp.txt · Last modified: 2013/05/24 10:36 (external edit)