转发和重定向之间的区别 [英] difference between forwarding and redirection

查看:308
本文介绍了转发和重定向之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

jsp转发和重定向之间的区别

有没有人知道Http servlet中的转发和重定向之间的区别以及这些差异对浏览器刷新的影响吗?

Does anyone knows the differences between forwarding and redirection in Http servlets and the impact of these differences on browser refreshes?

推荐答案

转发在不让客户知道的情况下完成,它用于在服务器上进行内部通信,而在重定向我们要求客户回去并在此处询问。

forwarding is done without letting client know that, It is used to do internal communication at server, while in redirecting we are asking client go back and ask it over here.

转发

你去邮局那里有多个盒子和人,现在其中一个接受你的请求,它在内部转发给其他负责人来完成你的请求,并在结束时过程你会得到结果

You went to postoffice there are number of boxes and person sitting there, now one of them accepts your request and it internally forwards it to other responsible person to fulfil your request and at the end of the process you will get the result

重定向

现在同一个人给你一个表示转到窗口no5的令牌并询问该人。

now the same person gives you a token which says goto window no5 and ask that person .

另见

  • difference-between-jsp-forward-and-redirect

这篇关于转发和重定向之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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