Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

advantage of multiple instance...

 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Naveen K Garg
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic