Apache Tomcat JK configuration

S

sonnel

I have a Java application running on Tomcat 5.5.17 over Apache 2
through JK connector. The tree of the application looks like this

<ROOT>
- include.jsp
- /images
- /js
- /public
- test.jsp
- /META-INF
- /WEB-INF
....

I configure *.do to route to forward to Tomcat from Apache.

# httpd.conf
....
<VirtualHost *:80>
...
JkMount /*.do worker1
JkMount /*.jsp worker1
JkMount /public/* worker1
...
</VirtualHost>
....
# eof

# workers.properties
....
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
....
# eof

I can access most of the action classes and other pages.
The problem is when I access resouces under /public, the server returns
error.
For /public/*.do, the server response 404.
For /public/*.jsp, the jsp seems to see /public as the context root and
that makes it cannot include the resouces from the parent directory. Am
I missing something. Please help.

Thanks!
 
S

sonnel

More details...

# httpd.conf
....
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
....
# eof

And the 404 response is from Tomcat rather than Apache...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top