You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ariel <ar...@wapcominc.com> on 2001/02/01 17:45:32 UTC
Changing context logical path
I would like to invoke my servlets from
http://myHost/MyContextBase/MyServlet
instead of:
http://MyHost/MyContextBase/servlet/MyServlet
In other words i want to ommit ../servlet from the path.
Is it possible?
Ariel
RE: Changing context logical path
Posted by Dan Rapp <dr...@whizbang.com>.
>> Yes. Just add the appropriate servlet mapping in the web.xml
>> file in the WEB-INF directory of your webapp. Look at the
>> examples web.xml file for a guide on how to do it.
I also had a question relating to this. I've actually modified my web.xml
file to include a servlet mapping, and when I do so, I can access the
servlet with the new mapping by hitting Tomcat directly with the http
request, but when I try to access the servlet from a request through the
appache server I get a page not found response, unless I modify the
mod_jk.conf file generated by Tomcat to include the new mappings as well.
Is there anyway to get this to happen automatically?
--Dan
RE: Changing context logical path
Posted by Stefan Langer <ma...@gmx.de>.
Yes. Just add the appropriate servlet mapping in the web.xml file in the WEB-INF directory of your webapp. Look at the examples web.xml file for a guide on how to do it.
Stefan