wood burning stoves 2.0*
The moose likes Servlets and the fly likes How to make two instances of servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to make two instances of servlet" Watch "How to make two instances of servlet" New topic
Author

How to make two instances of servlet

Malhar Me
Greenhorn

Joined: Jun 22, 2009
Posts: 27
Hi,

Will it create 2 instance of a servlet by writing 2 different names in we.xml for the same servlet class.

Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

Yes, for each different name that the servlet is registered with, a different instance of the servlet will be created...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60822
    
  65

we.xml?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Leonardo Carreira
Ranch Hand

Joined: Apr 07, 2009
Posts: 489

It might One Servlet Java Class mapped with two different URL..

correct me if i'm wrong..

Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to make two instances of servlet
 
Similar Threads
how 2 call ejb file using servlet
web.xml within tomcat
How to pass a session from a class to another class
2 Servlet Contexts in Single Appication?
Sent data to different Application servlet