Does <jsp:forward> or RequestDispatcher.forward use GET or POST?

。_饼干妹妹 提交于 2019-12-01 10:21:03

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!