File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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...
 
Similar Threads
Advantage of Spring than EJB
JSP & Presentation
adv/disadv of sockets?
Using ThreadLocal for setting data in a WebApplication
WA #1.....word association