You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gabriel Marti <ma...@hotmail.com> on 2001/06/30 07:27:16 UTC

web.xml files and servlet mapping

Hello, I was reading over the past answers to some servlet mapping
questions, but i still cannot get my situation to work. I have the following
setup:

D:/tomcat/webapps/clan/WEB-INF/classes/com/gabadoo/bp/servlet
                                                     /web.xml

In the servlet.xml i have added the following:
 <Context path="/clan"
                 docBase="/webapps/clan"
                 crossContext="false"
                 debug="5"
                 reloadable="true" >
 </Context>

And in the clan/WEB-INF/web.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>
 <Servlet>
  <Servlet-name>
   attemp
  </Servlet-name>
  <Servlet-class>
   com.gabadoo.bp.servlet
  </Servlet-class>
 </Servlet>
 <Servlet-mapping>
  <Servlet-name>
   attemp
  </Servlet-name>
  <url-pattern>
   /attemp
  </url-pattern>
 </Servlet-mapping>

</web-app>

the url:http://127.0.0.1:8080/clan/servlet/com.gabadoo.bp.servlet wors fine
however the mapping to http://127.0.0.1:8080/clan/servlet/attemp is a no go.
I thought this would work however nothing so far. I attempted to put the
tags in the main web.xml file however no difference.When i load up tomcat
one of the lines displayed says reading the file .....web.xml, but i dont
think it really is. Please help. thanks

Gabriel