tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: web.xml problems
Date Thu, 08 Nov 2001 07:04:31 GMT
The first thing you should do is download the Servlet Specification
<http://java.sun.com/products/servlet/download.html> and read the chapter
on mapping requests to servlets.  You will find that a <url-pattern> of
"ValidateUser" is illegal.  You probably want "/ValidateUser" instead.

Craig


On Wed, 7 Nov 2001, Carl Boudreau wrote:

> Date: Wed, 7 Nov 2001 20:55:53 -0600
> From: Carl Boudreau <carl.boudreau@notiva.com>
> Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>,
>      carl.boudreau@notiva.com
> To: 'Tomcat Users List' <tomcat-user@jakarta.apache.org>
> Subject: web.xml problems
>
> Here are my files,
>
> The working copy is loading  great, but I need to add a few more Classes, so
> I am trying to use the original.
> But when I did Tomcat4.0 wouldn't load the index.html page for the web apps
> context directory.
>
> So I took a shot in the dark and only added one <servlet></servlet> tag,
> when I added the second tag is
> stops working.  This same war file is running under WLS6.0 now.
>
> I have tried placing / in the <servlet-class>  without progress, then I
> tried it in the <url-pattern></url-pattern> tag
> with out success.  I bet it is one char, throwing the whole thing off.  But
> I'll be darn if I can find it.
>
>
> The working copy.
> <?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>ValidateUser</servlet-name>
> 		<description>Validate the incoming user servlet.</description>
> 		<servlet-class>ValidateUser</servlet-class>
> 	</servlet>
> 	<servlet-mapping>
> 		<servlet-name>ValidateUser</servlet-name>
> 		<url-pattern>ValidateUser</url-pattern>
> 	</servlet-mapping>
>
>
> </web-app>
>
> And here is the original
> <?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>ValidateUser</servlet-name>
> 		<description>Validate the incoming user servlet.</description>
> 		<servlet-class>ValidateUser</servlet-class>
> 	</servlet>
> 	<servlet-mapping>
> 		<servlet-name>ValidateUser</servlet-name>
> 		<url-pattern>ValidateUser</url-pattern>
> 	</servlet-mapping>
>
>
> 	<servlet>
> 		<servlet-name>ValidUser</servlet-name>
> 		<description>If user is valid then the servlet redirects to the main
> page.</description>
> 		<servlet-class>ValidUser</servlet-class>
> 	</servlet>
> 	<servlet-mapping>
> 		<servlet-name>ValidUser</servlet-name>
> 		<url-pattern>ValidUser</url-pattern>
> 	</servlet-mapping>
>
>
> 	<servlet>
> 		<servlet-name>Chat</servlet-name>
> 		<description>A Chat servlet.</description>
> 		<servlet-class>Chat</servlet-class>
> 	</servlet>
> 	<servlet-mapping>
> 		<servlet-name>Chat</servlet-name>
> 		<url-pattern>Chat</url-pattern>
> 	</servlet-mapping>
>
>
> 	<servlet>
> 		servlet-name>RegisterNewUser</servlet-name>
> 		<description>This servlet adds a new user the the database.</description>
> 		<servlet-class>RegisterNewUser</servlet-class>
> 	</servlet>
> 	<servlet-mapping>
> 		<servlet-name>RegisterNewUser</servlet-name>
> 		<url-pattern>RegisterNewUser</url-pattern>
> 	</servlet-mapping>
>
>
> 	<servlet>
> 		servlet-name>DisplayCapture</servlet-name>
> 		<description>This servlet Display Capture table from
> database.</description>
> 		<servlet-class>DisplayCapture</servlet-class>
> 	</servlet>
> 	<servlet-mapping>
> 		<servlet-name>DisplayCapture</servlet-name>
> 		<url-pattern>DisplayCapture</url-pattern>
> 	</servlet-mapping>
>
> </web-app>
>
>
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
>
>


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message