• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to run servlet in the Tomcat?

 
xiaoma wang
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, everyone:
I tried to run servlet in the Tomcat server. But when i put the servet classes in the direction other than "tomcat_root_directory"\Webapps\ROOT\WEB-INF\classes directory, I can not run the servlet! Anybody know how to deal with this problem?
Thank you!
Xiaoma Wang
 
Sam Dalton
Author
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi There.

You need to package your web applications up in the correct structure. Take a look at the JavaOne presentation on my website (www.samjdalton.com) about deploying web applications. This ought to answer your question.
Hope this helps
Cheers
Sam
 
Ambreen Haleem
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you copy the subcontents of ROOT and make a new directory place it inside it webapps alongside ROOT and paste inside the new directory you created. That's the way you can do that but it had to be inside webapps. then you can run srevlet like
http:\\localhost:8080\yourDir\servlet\servletName
 
xiaoma wang
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, Sam and Ambreen:
I am clear now. Thanks guys!

Xiaoma Wang
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic