*
The moose likes Servlets and the fly likes Calling a servlet within a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Calling a servlet within a servlet" Watch "Calling a servlet within a servlet" New topic
Author

Calling a servlet within a servlet

Steve Lam
Greenhorn

Joined: Aug 03, 2001
Posts: 5

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

Joined: May 30, 2001
Posts: 328
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


Raising Flares debut album 'Ignition' out now

http://www.raisingflares.com

Terry Doyle <br />SCPJ 1.4 , SCWCD , SCMAD(Beta)
Terence Doyle
Ranch Hand

Joined: May 30, 2001
Posts: 328
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

Joined: Aug 03, 2001
Posts: 5
Thanks!!!
 
 
subject: Calling a servlet within a servlet
 
Similar Threads
APPLICAION Server
Pagging Problem
Heap space out of memory error in pdffax generation program
request.getCookies(); is not returning all the cookies
Post-Redirect-Get pattern