You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by jianqing wang <ji...@hotmail.com> on 2001/07/02 14:55:44 UTC
Re: web.xml files and servlet mapping
Hi,
I don't know if your servlet.xml means server.xml.
I think all your configuration file is fine. What is wrong is your url.
Try http://127.0.0.1:8080/clan/attemp
Good luck!
Cindy Wang
NCS Pearson
>From: "Gabriel Marti" <ma...@hotmail.com>
>Reply-To: tomcat-user@jakarta.apache.org
>To: <to...@jakarta.apache.org>
>Subject: web.xml files and servlet mapping
>Date: Sat, 30 Jun 2001 01:27:16 -0400
>
>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
>
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.