servlet中forward与redirect的区别
来源:互联网 发布:神仙劫进阶数据 编辑:程序博客网 时间:2024/05/14 16:59
1.从地址栏显示来说forward是服务器请求资源,服务器直接访问目标地址的URL,把那个URL的响应内容读取过来,然后把这些内容再发给浏览器.浏览器根本不知道服务器发送的内容从哪里来的,所以它的地址栏还是原来的地址.redirect是服务端根据逻辑,发送一个状态码,告诉浏览器重新去请求那个地址.所以地址栏显示的是新的URL.2.从数据共享来说forward:转发页面和转发到的页面可以共享request里面的数据.redirect:不能共享数据.3.从运用地方来说forward:一般用于用户登陆的时候,根据角色转发到相应的模块.redirect:一般用于用户注销登陆时返回主页面和跳转到其它的网站等.4.从效率来说forward:高.redirect:低.
0 0
- servlet中forward与redirect的区别
- JAVA SERVLET API中forward() 与redirect()的区别
- SERVLET API中forward() 与redirect()的区别
- Servlet API中forward() 与redirect()的区别
- Servlet API中forward() 与redirect()的区别
- JAVA SERVLET API中forward() 与redirect()的区别?
- 面试-SERVLET API中forward()与redirect()的区别
- JAVA SERVLET API中forward() 与redirect()的区别
- 6、SERVLET API中forward() 与redirect()的区别?
- servlet API中forward() 与redirect()的区别?
- java servlet api 中forward()与redirect()的区别?
- Servlet--forward与redirect跳转的区别
- Servlet中 forward 和 redirect的区别
- Servlet中forward和redirect的区别
- Servlet中forward和redirect的区别
- Servlet中forward和redirect的区别
- Servlet中forward和redirect的区别
- Servlet中forward和redirect的区别
- oracle的分析函数over(Partition by...) 及开窗函数
- Java-检测Java程序运行时内存消耗的方法-Jconsole
- ORACLE 如何产生一个随机数
- 哈夫曼编码--压缩与解压
- 正则表达式
- servlet中forward与redirect的区别
- eclipse for mac部署web项目至本地的tomcat但在webapps中找不到的解决方法
- java,文件的绝对路径和相对路径
- C 语言流程控制与循环
- 闰秒原理及其对计算机系统影响
- Windows 高 DPI 的简单总结
- Android API Guide for Animation and Graphics(六)—— 动画与图形(OpenGL ES)
- Leetcode Reverse Linked List
- 文章标题