• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to run servlet on tomcat

 
Mani vannan
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all ,
I am using tomcat1.4 & doing JSP projects. I like to work with Servlets. Could any body tell me how to run my helloworldServlet.java using Tomcat ?

Thanks
 
James Wang
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Compile helloworldServlet.java file and copy your class file to WEB-INF/classes directory, and modify your servlet declaration of web.xml and servlet mapping definition, you may refer to the example of tomcat about servlet.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My advice is to study the servlet examples that come with Tomcat. Be sure to read this Ranch FAQ on the "invoker" servlet. - especially the "Why the Invoker is Evil" section.
Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!