This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling a servlet within a servlet

 
Steve Lam
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Is there a way to call a servlet within another servlet?
Thanks a lot!
PS. Both servlets reside on the same system
 
Terence Doyle
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
Yes. You can use a RequestDispatcher.
I'm not sure of the exact syntax so I'll let some other good soul volunteer that
Meanwhile I'll search the net for an example.....
Bye,
------------------
Terry Doyle
Sun Certified Programmer for Java 2 Platform
 
Terence Doyle
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Found one!!
http://java.sun.com/docs/books/tutorial/servlets/communication/request-dispatcher.html

Hope that helps,
------------------
Terry Doyle
Sun Certified Programmer for Java 2 Platform
 
Steve Lam
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic