Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in running first servlet

 
Pandurang Kekhale
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for reading this post.

This is first time I am trying to run Servlet using jakarta-tomcat-5.0.28 I have followed steps from this article, and I am using http://localhost:8080/myApp/servlet/Testing url to run it in firefox but getting following error :

HTTP status 404 - The requested resource (/myApp/servlet/Testing) is not available.

Is there anything else to do, apart from this settings.

Please help me guys.
 
Imtiyaz Ahmed
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
have you mentioned url pattern correctly in Deployment Descriptor?

make sure you have written DD correctly and your servlet is in correct directory structure.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What this article does not show you is that you need to enable Tomcat's InvokerServlet. To do so, edit the web.xml file in your tomcat's conf directory (%TOMCAT_HOME%/conf/web.xml). Search the word "invoker" in this file.

1. You need to uncomment the invoker servlet
2. You need to uncomment the servlet mapping for the invoker
I let you figure out where both sections are. If you look for the word "invoker", you'll find them both.

Restart Tomcat, and retry to access your servlet.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65105
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mallinath Adki, pleas refrain from posting in all uppercase. Please read this for more information.
 
Pandurang Kekhale
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Guys.

especially thanks to Christopher verre .. I did it man! I was missing to uncomment the servlet mapping for invoker of conf/web.xml.

Now I am able to run it using this url http://localhost:8080/myApp/servlet/TestingServlet

Thank you!!
[ January 03, 2008: Message edited by: Pandurang Kekhale ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before moving forward, you might want to find out why the InvokerServlet was disabled and how you can deploy your servlets without it.

This article covers it pretty well.
http://faq.javaranch.com/java/InvokerServlet
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic