aspose file tools*
The moose likes Servlets and the fly likes advantage of multiple instance... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "advantage of multiple instance..." Watch "advantage of multiple instance..." New topic
Author

advantage of multiple instance...

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
We can mention in web.xml, the number of instances, container can create for any servlet.

My doubt is, what is the advantage of it?

Thanks.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Where did you see this?

You can certainly define multiple servlet entries using the same class.
This, could be useful if you wanted to reuse the same class but have different configurations for different mappings.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Naveen K Garg
Ranch Hand

Joined: Nov 28, 2005
Posts: 105
Hi Rathi

Are you refering to <load-on-startup> element in the servlet tag?.

Then you are having a misunderstanding regarding the web.xml elements.

Please check the servlet specification if you are in doubt.

Regards
Naveen K Garg

We can mention in web.xml, the number of instances, container can create for any servlet.
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Originally posted by Naveen K Garg:
Hi Rathi

Are you refering to <load-on-startup> element in the servlet tag?.

Then you are having a misunderstanding regarding the web.xml elements.

Please check the servlet specification if you are in doubt.

Regards
Naveen K Garg



No-no, now I know that 'load-on-startup' tag is for container to instantiate a servlet when server startups.

I understood it.


Thanks Ben & Naveen.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: advantage of multiple instance...