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 How to make two instances of servlet 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 "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: 9280
    
  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: 60041
    
  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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to make two instances of servlet
 
Similar Threads
how 2 call ejb file using servlet
How to pass a session from a class to another class
2 Servlet Contexts in Single Appication?
web.xml within tomcat
Sent data to different Application servlet