Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

http method

 
Nelson Nadal
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Usually, when a servlet are referred by RequestDispatcher through forward() or include(), what HTTP method are used? GET OR POST? Thanks.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It all depends on the original request type.
forward() forwards the request from one servlet to another. If the request was a POST request doPost() will get called on both, if it was a GET request doGet() will get called on both.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic