Web Develop
Alend_Yin
Hi, I’m Alend!
I’m a thoughtful boy. I love thinking, thinking about the essence of everything in the world, as well as human nature.
I’m also a realistic and optimistic guy. I love the romantic and easeful life style with a little challenge, which is
展开
-
转发(forward)和重定向(redirect)的区别
先是看上去不同,他们的调用分别如下:request.getRequestDispatcher("apage.jsp").forward(request, response);//转发到apage.jspresponse.sendRedirect("apage.jsp");//重定向到apage.jsp在jsp页面中你也会看到通过下面的方式实现转发:提到转发和重定向就不得不提到request作用域。转载 2008-03-03 21:31:00 · 1104 阅读 · 0 评论 -
在JSP+Servlet中使用会话跟踪技术的代码框架
Web应用创建于HTTP之上,这会有一个严重的问题,即HTTP是一个无状态的协议,每个请求和相应都是独立的。如果没有会话管理,每次客服端向服务器端发起一个请求,服务器端都不会记录有关客户的任何信息。从服务器度端的角度看,一个新的请求就是一个新的用户,这个请求和其它请求也没有任何关系。为了解决这个问题,在web中引入了会话(session)的概念。一个会话(session)是指从客户端发起第一个原创 2008-03-03 20:59:00 · 869 阅读 · 0 评论 -
java处理cookies
cookies是一种WEB服务器通过浏览器在访问者的硬盘上存储信息的手段:如IE浏览器把Cookie信息保存在C:/Document and settings/your name/cookies的目录下。当用户再次访问某个站点时,服务端将要求浏览器查找并返回先前发送的Cookie信息,来识别这个用户。cookies有下列优点: 1、Cookie能使站点跟踪特定访问者的访问次数、最后访问时间原创 2008-03-03 21:02:00 · 862 阅读 · 0 评论