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 deploying a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problem in deploying a servlet" Watch "Problem in deploying a servlet" New topic
Author

Problem in deploying a servlet

Jignesh Gohel
Ranch Hand

Joined: Dec 28, 2004
Posts: 276
Hello ,

I am having an problem in deploying a servlet.
Its like i have created the following directory structure in my tomact's webapps directory:

servletAPI/WEB-INF/classes/basicServlets/BasicServlet.class

My BasicServlet.java is in the package named 'basicServlets'.

Now when i am executing the following URL in the address bar:

http://localhost:8080/servletAPI/servlet/basicServlets.BasicServlet

the tomcat is displaying an error message that the resource is not available.

But when i am putting the same basicServlets/BasicServlet.class in the

examples/WEB-INF/classes/basicServlets/BasicServlet.class

it is getting executed exactly.

So could anybody please tell me what might be the problem with my

servletAPI/WEB-INF/classes/basicServlets/BasicServlet.class

directory structure.

Thanking you,
Jignesh


Regards,
Jignesh

The Art Of Life Is To Know When To Be Useless And When To Be Useful - CHUANG TZU
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

The servlets-example app uses an invoker servlet.
The global invoker has been disabled in all but the oldest versions of Tomcat.
You can read why here: http://faq.javaranch.com/view?InvokerServlet

Mapping a servlet is very easy.



Try using that as your deployment descriptor (web.xml).

Then access your servlet with the following URL:
http://localhost:8080/servletAPI/BasicServlet


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in deploying a servlet
 
Similar Threads
using "Professional Java Servltes 2.3"
Basic Servlet Problem
Help to find the error.
Map URI to worker - Tomcat
Difficulty with j2ee tutorial helloservice RPC sample