tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Hole <>
Subject Manual servlet deployment problems on 4.1.18
Date Wed, 26 Feb 2003 18:03:54 GMT
Yes, I am a newbie.

I am having some difficulty in getting *any* servlets to deploy on a 
Tomcat 4.1.3 installation in my development environment.   It is very 
likely a simple configuration problem, but I have tried about everything I
can think of to resolve it with no luck.


 Redhat Linux 8.0 (kernel 2.4.18)

All of the example, management and admin servlets are working properly in 
the Tomcat instance.

I have tried the simplest possible servlet implementation "simple" (hello 
world). The class definition was ripped of directly from the shipped 
examples with only a name change in the class itself (to hopefully 
eliminate java class loading problems).

The servlet was deployed as:


The web.xml file contains (less the ---- delimiters):
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"




The behaviour that I see is:

1.   The servlet appears to deploy when Tomcat starts up (at least the 
logs seem to say so).   It appears to find the class libraries.

2.   When I run the servlet it simply lists the 
${CATALINA_HOME}/webapps/simple directory.   The logs seem to indicate 
that it maps the URI to the "default" servlet, which lists directories.  
It does not run the servlet class that I specify in the web.xml file.

I have tried the following things:

1.   I created the following <context> element in the server.xml file to 
explicitly define the context (rather than letting it build an implicit 

<Context path="/simple" docBase="simple" debug="1" reloadable="true" />

Note that I turned on debugging which elicited the following log entries 
in the logs/localhost_log.2003-02-26.txt file.

2003-02-26 10:25:02 StandardContext[/simple]: Mapping contextPath='/simple' with requestURI='/simple/'
and relativeURI='/'
2003-02-26 10:25:02 StandardContext[/simple]:  Mapped to servlet 'default' with servlet path
'/' and path info 'null' and update=true

Which seems to confirm the mapping of the URI to the default servlet 
rather than the "simple" servlet.

2.   The original "simple" class was not part of a package and I had it
placed directly under the "classes" directory.  I tried defining it to be 
in the ca.esys package and put it under the classes/ca/esys directory, but
that didn't work.

3.   I've tried referring to the servlet using the URI's:


The first maps to the default servlet.   The second gives a "resource 
unavailable" error - which I would expect.

So ...

I am at a loss.   Any ideas for things to try would be very helpful.  I've
looked at every example I could find and scanned through the list archive 
for similar things, but had no luck. 

Thanks ahead for any help that you can provide.


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

View raw message