Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem happens on some computers but not others

 
jaime yang
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am running servlet examples from the Hanumant and Jignesh book on tomcat . I get this error message on some computers but not on others :
The requested resource (/chapter02/servlet/HelloServlet) is not available.

However, if I put in the <servlet-mapping> to map the name of the servlet to servlet/nameOfServlet, I will not get the error message and the servlet runs perfectly well. This problem happens on some computers but not on others.

Can someone explain to me why ? I have tried very hard to solve this problem but I can't and it really bothers me.

Thnak You
 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems that you have problem in your servlet mapping. You write the url
pattern on the browser that is mapped to certain servlet.

Thanks,
 
jaime yang
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for trying to help. No I don't have problem with <servlet-mapping>. It is actually the <servlet-mapping> that help me solve the problem. However, I don't understand why I need to use <servlet-mapping> to make things work. And this only happen on some machines.

Can the guru out there help me ?
 
Satya Maheshwari
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would help if you could paste the related portion of the web.xml and the location of your servlet class w.r.t. webapp here.As I understand, you servlet class file is located here:
<webapp>/WEB-INF/classes/chapter02/servlet/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic