0

my simple question is:

by default, when i do request.getRequestDispatcher("\someUri").forward(request, response);

will it be a doPost or a doGet request? and what exacly does it depend on? (assuming i didn't make wrapper class.)

ndpu
  • 22,225
  • 6
  • 54
  • 69

1 Answers1

1

doGet()/doPost() depends on your request 'METHOD' type. If it is GET then doGet(). If it is POST then doPost(). While doing forward you are passing same request as parameter. So, that same request METHOD type decides your forward type.

Pokuri
  • 3,072
  • 8
  • 31
  • 55
  • okay, so the METHOD type decides the forward type, but what is the METHOD types -default- value? because i noticed there is no simple setter for this. – user1817189 Dec 11 '13 at 12:30