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


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Deploy a single servlet in Tomcat?" Watch "Deploy a single servlet in Tomcat?" New topic
Author

Deploy a single servlet in Tomcat?

Pourang Emami
Ranch Hand

Joined: Sep 21, 2002
Posts: 127
Any hep would be highly appreciated on the following problem:
I want to deploy a single servlet inside the ROOT(default application) directory of Tomcat, But it doesn't work?
The scenario:
servlet name: MyServlet
1-Created a directory named "classes" inside the following path:
C:\Program Files\Apache Group\Tomcat 4.1\webapps\ROOT\WEB-INF
2-Inside "classes", created a directory named "mypackage1"(the package name declared in the servlet)
3-Put MyServlet.class inside "mypackage1" folder
4-add the following elements inside web.xml:
<servlet>
<servlet-name>MyServlet</servlet-name>
<servlet-class>mypackage1.MyServlet</servlet-class>
</servlet>
5-restart Tomcat
6-Tried to invoke the servlet under following URL:
http://localhost:8080/servlet/mypackage1.MyServlet
7-I get the following error message:
------------------------------------------
type Status report
message /servlet/mypackage1.MyServlet
description The requested resource (/servlet/mypackage1.MyServlet) is not available.
------------------------------------------
Apache Tomcat/4.1.18

Thank you for your reply.
Best Regards, Pourang
[ December 04, 2003: Message edited by: Pourang Emami ]
[ December 04, 2003: Message edited by: Pourang Emami ]

Best Regards,<br />Pourang Emami
Mark Latham
Greenhorn

Joined: May 27, 2003
Posts: 22
Checkout the Tomcat FAQ at http://test.javaranch.com/wiki/view?TomcatFaq
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

And this is Tomcat-specific, so it's being moved to Apache/Tomcat.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deploy a single servlet in Tomcat?