give that one a try:
<url-pattern>/story/*</url-pattern>
using SERVERNAME/sampleapp/story
-----Original Message-----
From: Erin Lester [mailto:[EMAIL PROTECTED]]
Sent: Dienstag, 26. Juni 2001 16:25
To: [EMAIL PROTECTED]
Subject: web.xml not working
I have created a web application as per the Servlet API specs and deployed
it into the webapps directory of Tomcat in a directory called 'sampleapp.'
The only way that I am able to access the webapp's servlet (which is in
sampleapp/WEB-INF/classes) is by the url
'SERVERADDRESS/sampleapp/servlet/SERVLETNAME' and this is only when I
don't have a web.xml file in the WEB-INF directory. When I place the
web.xml file that I created (using to the documents on the Sun and
Jakarta sites) I am unable to find my servlet.
The servlet mapping in the web.xml file looks like this:
<servlet>
<servlet-name>StoryGeneratorServlet</servlet-name>
<servlet-class>StoryGenerator</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>StoryGeneratorServlet</servlet-name>
<url-pattern>/story</url-pattern>
</servlet-mapping>
I tried using the urls 'SERVERNAME/sampleapp/servlet/story' and
'SERVERNAME/sampleapp/story'
I also tried to install the J2EE sample 'petstore' web application but had
problems accessing the servlets with it too. I am able to get to the jsps
and static files okay.
Does anyone know what I am doing wrong?
Thanks!
Erin
PS - I'm using Tomcat 3.2 with Apache 1.3 on Sun 2.7