aspose file tools*
The moose likes Tomcat and the fly likes Tomcat not seeing servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat not seeing servlet" Watch "Tomcat not seeing servlet" New topic
Author

Tomcat not seeing servlet

Stef Mischook
Greenhorn

Joined: Nov 12, 2004
Posts: 15
Hi,

Using Tomcat 5.0.28 standalone on windows XP with JVM 1.4, I get this error even though I have mapped my servlet in the web.xml file of the web app:


HTTP Status 404 - /loginResponse.do

--------------------------------------------------------------------------------

type Status report

message /loginResponse.do

description The requested resource (/loginResponse.do) is not available.


--------------------------------------------------------------------------------

Apache Tomcat/5.0.28


I've placed my webapp folder in the webapps directory and all the jsp pages run fine as do my POJO's for business logic, any ideas why the servlet code could be causing problems?

The servlet mappings:



It's my first time using Tomcat, been a Resin user for years ...

Thanks,

Stef


<a href="http://www.killersites.com" target="_blank" rel="nofollow">http://www.killersites.com</a><br /><a href="http://www.how-to-build-websites.com" target="_blank" rel="nofollow">http://www.how-to-build-websites.com</a><br /><a href="http://www.websitetemplates.name" target="_blank" rel="nofollow">http://www.websitetemplates.name</a>
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12675
    
    5
If the URL you are using contains "/servlet/" it may be an "invoker" servlet problem. See this FAQ here at the ranch.
Bill
Stef Mischook
Greenhorn

Joined: Nov 12, 2004
Posts: 15
Hi,

Nah, I'm actually posting to the url-pattern I defined in the web-apps web.xml file:



Could the mapping problem have to do with setting the context path for the application?

In ${catalina.home}/conf/Catalina/localhost I've created an .xml file named after my web app that contains this code:

Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

contextPath must be present, otherwise Tomcat will assume you are accessing the default application for that host (the one with no context path).

your path should be action="/myWebApp/loginResponse.do"
Stef Mischook
Greenhorn

Joined: Nov 12, 2004
Posts: 15
Hi,

I reinstalled tomcat and things are working now.

Thanks ...
[ November 22, 2004: Message edited by: Stef Mischook ]
 
jQuery in Action, 2nd edition
 
subject: Tomcat not seeing servlet
 
Similar Threads
Using servlets params from filters
Access Servlet InitParameters in JSP
servlet-mapping
Servlet mapping problem ...
Cannot find FacesContext