Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Deploy a single servlet in Tomcat?

 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Checkout the Tomcat FAQ at http://test.javaranch.com/wiki/view?TomcatFaq
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And this is Tomcat-specific, so it's being moved to Apache/Tomcat.
 
We must storm this mad man's lab and destroy his villanous bomb! Are you with me tiny ad?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic