tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Emenaker" <>
Subject Re: Converting from JRun
Date Tue, 24 Oct 2000 22:39:12 GMT
> ie, in JRun, one would add a line to
> such as:
> /url/   Yourservlet

Sounds like you're using an older JRun. The version of JRun I was playing
with recently seemed to conform pretty closely to the servlet 2.2 spec.


First off, you need to go to your /etc/tomcat/server.xml (or whatever it is
for you) and find the tags that say "<Context>". The format of a Context
block seems to be something like:

<Context path="/urlpart1"
     reloadable="true" >

This basically tells tomcat that, if someone asks for anything starting with
"/urlpart1", to go interact with the webapp at /someplace/on/my/hard/drive.
It should serve up html and images files from just about anywhere in that
directory just like any docroot in a normal webserver... except for the
WEB-INF directory.

Stuff in /someplace/on/my/hard/drive/WEB-INF is never served up directly.
There should be a web.xml file in there that let you define *more* url
mappings for individual servlets in your webapp. For example:


So, at this point, if you asked tomcat for "/urlpart1/urlpart2", it should
go to your /someplace/on/my/hard/drive directory, find the mapping of the
"/urlpart2" to a servlet that you, internally, refer to as
"SomeServletNameThatTheOutsideWorldNeverSees". It then finds out that the
actual class that this corresponds to is "mypackage.MyServlet" and it tries
to find that class in /someplace/on/my/hard/drive/WEB-INF/classes or in any
jar file in /someplace/on/my/hard/drive/WEB-INF/lib.

Clear as mud?

- Joe

View raw message