• 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:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

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

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Do not meddle in the affairs of dragons - for you are crunchy and good with ketchup. Crunchy tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic