首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

深入显出 jsp and servlet 第二版 读书笔记

2012-09-03 
深入浅出 jsp and servlet 第二版 读书笔记1st. redirect client 客户端跳转request server 服务器

深入浅出 jsp and servlet 第二版 读书笔记
1st. redirect= client = 客户端跳转
request = server = 服务器端跳转
A request redirect is different from a request dispatch. A request dispatch
(covered more in another chapter) happens on the server, while a redirect
happens on the client. A request dispatch hands the request to another
component on the server, usually within the same web app. A request
redirect simply tells the browser to go a different URL

?
2nd. HttpServletResponse 常用方法 setContentType, getWriter

3rd. To redirect a request, call sendRedirect(aStringURL) on the response.

4th. You cannot call sendRedirect() after the response is committed! In other
words, if you’ve already written something to the stream, it’s too late to do
a redirect.

热点排行