Win a copy of Mastering Non-Functional Requirements this week in the Design forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

create multiple instance of a sevlet  RSS feed

 
felix thomas
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I there a way in Java where we can create multiple separate instance of a servlet. I know a way where in the the application server configuration where we can do it, but i want to know if we can do it through java API
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65961
139
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you can certainly create a new instance via its constructor, but that would not put it into play as a servlet -- it'd just be a standalone (and useless) instance of the class.

It's the container's job to create and put servlets into service. Why do you feel the need to do it yourself?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!