my dog learned polymorphism*
The moose likes Servlets and the fly likes Serlet calls another servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Serlet calls another servlet" Watch "Serlet calls another servlet" New topic
Author

Serlet calls another servlet

Brendan Kennedy
Ranch Hand

Joined: May 02, 2001
Posts: 65
How do you call one servlet from another without using a href or
anything like that, i.e. one servlet does a search, gets some
results back and then calls another servlet to display them.
Thanks,
Brendan
sandy gupta
Ranch Hand

Joined: Jan 30, 2001
Posts: 228
Use the Request Dispatcher to fwd the request to the other servlet or use the response.sendRedirect method
Both will work
Sahil
p.s: Careful about the fall-through nature of the 2 calls


Adios
 
 
subject: Serlet calls another servlet