• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

create multiple instance of a sevlet

 
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
Pie
Posts: 65335
97
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic