18,356
社区成员
发帖
与我相关
我的任务
分享
网站登陆成功后,设置session代码如下:
session.setAttribute("uid",uid);
然后重定向到登陆成功的页面:
response.sendRedirect(....);
POST /_login.jsp HTTP/1.1
Host: 192.168.1.2
Accept-Language: zh-cn
Connection: keep-alive
username=admin&userpwd=admin
HTTP/1.1 302 Moved Temporarily
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=129FDBC989E0942F3EB64C818554AB94; Path=/glxt
Location: http://192.168.1.2/glxt/index.jsp?fid=40&tid=3
Content-Type: text/html;charset=UTF-8
Content-Length: 0
Date: Sat, 18 Feb 2012 05:55:49 GMT
GET /glxt/index.jsp?fid=40&tid=4 HTTP/1.1
Host: 192.168.1.2:8080
Cookie: JSESSIONID=129FDBC989E0942F3EB64C818554AB94
HTTP/1.1 302 Moved Temporarily
Server: Apache-Coyote/1.1
Location: http://192.168.1.2:8080/glxt/index.jsp?fid=1&tid=3
Content-Type: text/html;charset=UTF-8
Content-Length: 0
Date: Sat, 18 Feb 2012 05:55:49 GMT
POST /_login.jsp HTTP/1.1
Host: 192.168.1.2
Accept-Language: zh-cn
Connection: keep-alive
username=admin&userpwd=admin
GET /_login.jsp?username=admin&userpwd=admin HTTP/1.1
Host: 192.168.1.2
Accept-Language: zh-cn
Connection: keep-alive