LSWS 2.0RC6 + Tomcat

I'm having problems getting LSWS to work with tomcat and was wondering if anyone had ideas...

I've got lsws and tomcat 5 installed on the same box. Tomcat is configured for ajp 1.3 listening on port 8009 (basically the default installation). Connecting to port 8080 gets a positive response from tomcat. The /jsp-examples/ web app is installed and running fine, so I don't think it is a tomcat problem so far...

So in my server I define an external app named Tomcat5 pointing at but no script handler (I'm trying to use the context hander).

In my virtual host I create a context handler, define the web app type, set the uri to /jsp-examples/ (so it matches the path for the external app), set up the path to the /opt/tomcat5/webapps/jsp-examples/, then saved all of the configuration changes.

Restarted the lsws server (just to make sure we're staring fresh) and point at
, but all I get is a 404 response. There is absolutely nothing in either the server logs nor the virtual host logs (outside of the single line entry in the access logs) to indicate what the problem might be...

Can anyone make a suggestion as to how I would resolve this?

Thanks in advance...
Last edited by a moderator:

Well, made a little progress. By setting the index file to "index.jsp" it now loads the jsp page, but it displays only text.

So I figured I needed the script handler also. Defined the script handler for jsp to the servlet engine and wahoo, it works...

So here's some additional info that maybe should be incorporated into the online help:

1. Define the web app as currently mentioned in the online help (see info from previous post).
2. Be sure to define the index files to index.jsp (if that's the entry point).
3. Define the script handler for jsp to point to the servlet engine.

My guess is that, since the script handler can only be configured at the server level the servlet engine must be defined at the server level also, otherwise it probably wouldn't work.


LiteSpeed Staff
Thank you for your feedback.
You pretty much figured it out.

We will add the index.jsp part into our documentation,
Thank you for the suggestion. :)

Script handler configuration is available at virtual host level, under the "general" tab.


LiteSpeed Staff
The tomcat Native Library is tomcat internal feature, you just follow the instruction as if Apache is use, to build the Native library using APR. It wont change any configure on LSWS side.