File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes problem in running first servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "problem in running first servlet" Watch "problem in running first servlet" New topic
Author

problem in running first servlet

Pandurang Kekhale
Greenhorn

Joined: Dec 27, 2007
Posts: 2
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

Joined: Dec 03, 2007
Posts: 3
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

Joined: Nov 24, 2005
Posts: 14688
    
  16

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.


[My Blog]
All roads lead to JavaRanch
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61417
    
  67

Mallinath Adki, pleas refrain from posting in all uppercase. Please read this for more information.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Pandurang Kekhale
Greenhorn

Joined: Dec 27, 2007
Posts: 2
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

Joined: Dec 11, 2004
Posts: 13410

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


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: problem in running first servlet