tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amrhein, Thomas" <>
Subject AW: problems of using Tomcat
Date Wed, 01 Mar 2000 08:23:06 GMT
Hi Rong,

my statements to your problems are below.

Why dont you read the FAQs? There are many answers for Tomcat beginners.

And the archive of this mailinglist is also very helpful.
I joined last week and have all the problems with Tomcat 3.0 solved without
posting a single question.



1) Tomcat 3.0 does not automatically reload modified servlets or classes.
Try JSPs or wait for 3.1 which is coming soon.

2) Have a look at this:

Von:	Craig R. McClanahan []
Gesendet:	Mittwoch, 1. März 2000 03:58
Betreff:	Re: How can I change the servlet path?

Arion wrote:

> Hi!
> The default local path for CONTEXT is <CONTEXT docbase>/web-inf/classes,
> am I right? How can I override the setting say <CONTEXT
> docbase>/servlet?

You are confusing the class path for a context (used to locate all Java
classes referenced by a web application, not just servlet classes) with the
URL that is mapped to a particular servlet.

The 2.2 servlet specification defines that all classes under
WEB-INF/classes (and all JAR files under WEB-INF/lib) become part of the
class path for a particular context.  However, this has nothing to do with
how you access servlets found in those directories via a URL.

If you use a URL like "/{context-path}/servlet/xxxxx", Tomcat looks for a
class named "xxxxx" in one of the above two locations, or along the system
class path if not found there.  It follows the usual Java rules for
resolving classes that are inside packages.

In addition, you can map a servlet to a specific path to a specific servlet
using <servlet-mapping> element in the web.xml file.  Again, the class
itself is located by looking in WEB-INF/classes, WEB-INF/lib/*.jar, or
along the system class path.  See the servlet 2.2 specification for more
details and examples.

> Thank you
> Arion

Craig McClanahan

PS:  Tomcat 3.0 had a bug that prevented classes in WEB-INF/lib/*.jar from
being found.  This has been fixed in more recent releases.

To unsubscribe, e-mail:
For additional commands, e-mail:

-----Ursprüngliche Nachricht-----
Von: rong []
Gesendet am: Dienstag, 29. Februar 2000 22:38
Betreff: problems of using Tomcat 

I have installed the Tomcat-3.0 on Linux, and trying to play around with
my code. I have two problems so far.

1)I wrote a and copied into


  directory. I can compile and see from browser the "Hello" servlet
  running on my machine. However, after i modified and recompiled the I couldn't see any change from brower. I guess the old
  thread is still running. I have to stop server and restart to get 
  the new result work.

2)I tried to mkdir a servlets directory(~/tomcat-3.0/servlets)and copy to that directory, hoping that i can see this servlet running
  when i browse //localhost/servelets/Hello. But i failed even after
  change the access mode of this directory and files inside. I don't know
  what else do i need to change to get this work. 

Thank you very much.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message