• Post Reply Bookmark Topic Watch Topic
  • New Topic

How can I forward the from doPost to doGet  RSS feed

 
Huzefa Zohaib
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I forward the control from doPost to doGet using forward() method of request dispatcher or otherwise.
 
Mark Howard
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simply call the one method from the other.
eg. From within doGet(), call doPost() passing both the request and response objects.
doPost then has access to the same request that triggered doGet in the first place.
Or vice-versa
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!