This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Create two instances for a servlet  RSS feed

 
vinaykrothapalli kumar
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
how can we create two instances of a servlet?
please help me
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you give the same servlet multiple mappings it will create a separate instance for each mapping. What are your requirements?
 
Anoop Kavalloor
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To create two instance of the servlet, in the Deployment Descriptor, make two tags of the servlet. That should do the trick.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Unqualified Genius",
You have already rrecieved a warning about your display name here.

Please correct it immediately or your account will be deleted.

thanks,
David O'Meara
Moderator.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by David O'Meara:
If you give the same servlet multiple mappings it will create a separate instance for each mapping. What are your requirements?


Did you mean multiple servlet entries, David?
Multiple mappings can point to the same instance.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You were quite right to correct me, poor choice of words from me. I was referring to the steps-from-servlet-class-to-url mapping in a mathematical sense.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!