问题
The question is in the title: Does <jsp:forward>
or RequestDispatcher.forward
use GET or POST to do its thing?
If it uses one, can I always count it will be that one or can this vary from server to server?
Thank you all!
回答1:
Neither; it directly looks up the servlet class in your container and then calls the dispatcher.
The dispatcher will examine the type of the request and call the appropriate method. So if the original request was POST
, doPost()
will be called.
来源:https://stackoverflow.com/questions/4374548/does-jspforward-or-requestdispatcher-forward-use-get-or-post