tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Wentzel <Michael.Went...@aswethink.com>
Subject RE: web.xml problem?
Date Wed, 04 Apr 2001 14:08:46 GMT
> 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!

Mime
View raw message