是< jsp:forward>或RequestDispatcher.forward使用GET或POST? [英] Does <jsp:forward> or RequestDispatcher.forward use GET or POST?

查看:131
本文介绍了是< jsp:forward>或RequestDispatcher.forward使用GET或POST?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题出在标题中:< jsp:forward> RequestDispatcher.forward 使用GET或POST做它的事情?

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?

谢谢大家!

推荐答案

两者都没有;它直接在容器中查找servlet类,然后调用调度程序。

Neither; it directly looks up the servlet class in your container and then calls the dispatcher.

调度程序将检查请求的类型并调用适当的方法。因此,如果原始请求是 POST ,则将调用 doPost()

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.

这篇关于是&lt; jsp:forward&gt;或RequestDispatcher.forward使用GET或POST?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆