Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How i can place all my servlet files in a different folder  RSS feed

 
Rashmi Pant
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
All please anybody tell me how i can place all my servlet files in a different folder and can run them.
Consider if i have a small project havinf 3-4 servlet files and i want to put it in a saperate directory and want to run it then how i can do do so.
Also tell me how should i map servlet if i am putting my servlet files in a different folder.
I do not want to place my servlet file in default folder or you can say testing folder of Tomcat.
I am using Tomcat5 and jdk1.5
Please help me
Thanks to all
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also tell me how should i map servlet if i am putting my servlet files in a different folder.

What you are calling folders are actually packages, so there's no problem putting your servlets in different packages.
For example, two different servlets in two different packages :
/myapp/WEB-INF/classes/management/AdminServlet.class
/myapp/WEB-INF/classes/user/ListingServlet.class

You can declare them separately.

I leave you figure out how to map different urls to different servlets.
 
Rashmi Pant
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Christophe Verre:

What you are calling folders are actually packages, so there's no problem putting your servlets in different packages.
For example, two different servlets in two different packages :
/myapp/WEB-INF/classes/management/AdminServlet.class
/myapp/WEB-INF/classes/user/ListingServlet.class

You can declare them separately.

I leave you figure out how to map different urls to different servlets.



Hi,
Thanks a lot now it is working.
Thank you very much.
Rashmi
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!