jdoklovic
asked on
Mapping welcome-file (index.jsp) to tomcat
Hi.
I'm trying to map ALL index.jsp files through apache to tomcat.
Basically I want to be able to create subdirs in my tomcat root context and just throw an index.jsp in there without having to map the directory in workers2.properties.
Example:
in httpd.conf -
...
DirectoryIndex index.jsp
...
in workers2.properties -
...
[uri:www.mydomain.com:80/*.jsp]
worker=ajp13:localhost:800 9
...
Now I want to create a folder/file in my tomcat context like this:
/testdir/index.jsp
When i do this, I can hit: http://www.mydomain.com/ and it picks up the index.jsp and forwards to tomcat just fine.
But when i hit: http://www.mydomain.com/testdir/ I get a 404 from apache. (not forwarding to tomcat)
anyone know how i can resolve this without having to map every subdirectory in workers2.properties?
I'm trying to map ALL index.jsp files through apache to tomcat.
Basically I want to be able to create subdirs in my tomcat root context and just throw an index.jsp in there without having to map the directory in workers2.properties.
Example:
in httpd.conf -
...
DirectoryIndex index.jsp
...
in workers2.properties -
...
[uri:www.mydomain.com:80/*.jsp]
worker=ajp13:localhost:800
...
Now I want to create a folder/file in my tomcat context like this:
/testdir/index.jsp
When i do this, I can hit: http://www.mydomain.com/ and it picks up the index.jsp and forwards to tomcat just fine.
But when i hit: http://www.mydomain.com/testdir/ I get a 404 from apache. (not forwarding to tomcat)
anyone know how i can resolve this without having to map every subdirectory in workers2.properties?
ASKER
see the last line in my initial post.....
"anyone know how i can resolve this without having to map every subdirectory in workers2.properties?"
"anyone know how i can resolve this without having to map every subdirectory in workers2.properties?"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The problem is that if i create a directory under testdir like: testdir/test/ and then try to go to:
http://www.mydomain.com/testdir/test/
it never gets to tomcat because the test directory doesn't exist under the apache root, and so it throw a 404.
I think i found my answer though.....
if i just create empty directories under apache that match the real ones under tomcat, then apache finds th directory and tries to load index.jsp, which in turn forwards the request to tomcat.
thanks anyway though.
- Jonathan
http://www.mydomain.com/testdir/test/
it never gets to tomcat because the test directory doesn't exist under the apache root, and so it throw a 404.
I think i found my answer though.....
if i just create empty directories under apache that match the real ones under tomcat, then apache finds th directory and tries to load index.jsp, which in turn forwards the request to tomcat.
thanks anyway though.
- Jonathan
# Uri mapping
[uri:/testdir/*]
worker=ajp13:localhost:800