It's not a secret anymore!
The moose likes Servlets and the fly likes http method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "http method" Watch "http method" New topic

http method

Nelson Nadal
Ranch Hand

Joined: Jun 06, 2002
Posts: 170
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

Joined: Oct 12, 2000
Posts: 5093
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.

I agree. Here's the link:
subject: http method
It's not a secret anymore!