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

Serlet calls another servlet

 
Brendan Kennedy
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic