You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michael Wentzel <Mi...@aswethink.com> on 2001/04/04 16:08:46 UTC

RE: web.xml problem?

> I'm using tomcat321 on NT4.0.
> I have a simple login page that I'm trying to call my servlet 
> to do some
> processing on the request parameters. But, Tomcat cannot find 
> my servlet.
> See the details below. Any suggestions?
> 
> Here are my paths:
> 
> c:\opensource\tomcat321\webapps\TrainingPlansRepository\jsp\Login.html
> c:\opensource\tomcat321\webapps\TrainingPlansRepository\web-in
> f\classes\born\servlets\LoginController.class
> 
> Here is a part of my web.xml:
> 
> <web-app>
> <servlet>
> <servlet-name>
> LoginController
> </servlet-name>
> <servlet-class>
> born.servlets.LoginController
> </servlet-class>
> 
> <servlet-mapping>
> <servlet-name>
> LoginController
> </servlet-name>
> <url-pattern>
> /TrainingPlansRepository/born/servlets/LoginController
> </url-pattern>
> </servlet-mapping>
> 
> Here is the line that matters in my Login.html:
> <FORM METHOD=POST ACTION="born/servlets/LoginController">
> 
> Here is the resulting error msg in Netscape:
> Not Found (404)
> 
> Original request:  
> /TrainingPlansRepository/jsp/born/servlets/LoginController
> 
> Not found request:  
> /TrainingPlansRepository/jsp/born/servlets/LoginController
> 


change your url pattern to 
<url-pattern>
	LoginController
</url-pattern>

or
<url-pattern>
	/servlet/LoginController
</url-pattern>

if you really want the servlet path in there.

and then change your ACTION to ../LoginController or
../servlet/LoginController
appropriately.


---
Michael Wentzel
Software Developer
Software As We Think - http://www.aswethink.com
mailto:wentzel@aswethink.com

- Punisher of those who cannot spell dumb!