tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Diggins" <>
Subject RE: servlet alias
Date Sun, 30 Jul 2000 00:06:49 GMT
Hi Chris --

first thought (probably wrong!)

can't you just add an extra "context" entity into your server.xml? Or does
that only work for directories?

        <Context path="/MyServlet"
docBase="application/servelt/org.tasteit.MyServlet" debug="0"
reloadable="true" >

(Can't get rid of the 8080, however, that's a TCPIP thing).


On second thoughts, make it part of a web-app, and amend the web.xml file.

Here's a snip, from the default web-app provided:
In there's your answer.

If you look at the standard install - the ROOT web-app manages to grab the
context for "/" no path

<!-- Define mappings that are used by the servlet container to
         translate a particular request URI (context-relative) to a
         particular servlet.  The examples below correspond to the
         servlet descriptions above.  Thus, a request URI like:


         will be mapped to the "graph" servlet, while a request like:


         will be mapped to the "controller" servlet.

         You may define any number of servlet mappings, including zero.
         It is also legal to define more than one mapping for the same
         servlet, if you wish to.




Third thought is to do the mapping from apache or whatever webserver you're
using (relatively trivial to do the mapping in apache, probably more complex
to go through the business of integrating apache to tomcat if what you're
doing is, like me, using tomcat standalone to get to the gritty stuff

Hope those musings help.

View raw message