Hi All!
This is my first post, so bear with me.
I've been struggling with this problem for
awhile. I'm trying to get tomcat to handle
servlet requests outside of
$TOMCAT_HOME/webapps/WEB-INF.
I am trying to do this because I have multiple
apache vhosts pointing to multiple server
paths for what needs to be multiple servlet
containers. Here are some example server
paths to
demonstrate my point...
/home/domain1.com/servlet
/home/domain2.com/servlet
...I have already setup the following files
like so and actually have jsp working in my
multiple server paths no problem. It's the
servlet directories that aren't working and
just give me error
404.
httpd.conf...
*all irrelevant information stripped*
<VirtualHost 0.0.0.0:80>
DocumentRoot /home/thesovereigngroup.com/www/pu
blic_html
ServerName www.thesovereigngroup.com
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
</VirtualHost>
server.xml...
<Host name="www.thesovereigngroup.com">
<Context path=""
docBase="/home/thesovereigngroup.com/www/public
_html" debug="0"/>
<Context path="/servlet"
docBase="/home/thesovereigngroup.com/www/public
_html/servlet" debug="0"/>
</Host>
....despite what looks to me like a proper
configuration, when I point my web browser at
http://www.thesovereigngroup.com/servlet/servle
texample i get a 404 error. I imagined at
first
this was because i didn't declare the servlet
in web.xml. So I copied it
to /home/thesovereigngroup.com/www/public_html/
servlet and declared a servlet like so...
<servlet>
<servlet-name>
hello
</servlet-name>
<servlet-class>
HelloWorldExample
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>
hello
</servlet-name>
<url-mapping>
/hello
</url-mapping>
</servlet-mapping>
...no dice still didn't work. There seems to
be very little documentation on this sort of
thing, and what it boils down to is I'm trying
to make tomcat host multiple servlet
containers. Any
ideas?
Brendon
|