Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat not seeing servlet

 
Stef Mischook
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I reinstalled tomcat and things are working now.

Thanks ...
[ November 22, 2004: Message edited by: Stef Mischook ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic