• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Path for Servlets

 
Dilip kumar
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have JDK in c:\jdk1.2.2 and Tomcat in C:\jakarta-tomcat.
Which is proper place(folder) to keep servlet files for testing?
Thanks
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By default you can put your servlet, say ExampleServlet.class, into the folder(in your case):
C;\jakarta-tomcat\webapps\examples\WEB-INF\classes\
Then you can call your servlet in browser in this way: http://localhost:8080/examples/servlet/ExampleServlet
Of course you do not have to just put your servlet in above directory, but you have to change the .conf files and .xml files by yourself.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
However, there is an important point to consider.
If you want Tomcat to correctly deliver initialization parameters to your servlet, you must give it an alias entry in the web.xml file. We just went round&round about that on the Tomcat users mailing list.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic