Redian新闻
>
session lost between JSP and Struts
avatar
session lost between JSP and Struts# Java - 爪哇娇娃
j*c
1
I have a login.jsp page and it directs to welcome.jsp page. Inside welcome.jsp
page, it has one link to call struts action and another link to call another
jsp. All jsp and struts are running within the same browser.
However, I debug and find struts one always creates a new session, because I
print out its session id and the id is different from the one in welcome.jsp.
The jsp one still keeps the same session (session id). Weird to me. I am using
tomcat 5.5.17.
Any idea about where I should chec
avatar
g*g
2
check api HttpRequest.getSession() and getSession(boolean),
also make sure the session expire period in web.xml is not too short.

jsp
another
.
using

【在 j***c 的大作中提到】
: I have a login.jsp page and it directs to welcome.jsp page. Inside welcome.jsp
: page, it has one link to call struts action and another link to call another
: jsp. All jsp and struts are running within the same browser.
: However, I debug and find struts one always creates a new session, because I
: print out its session id and the id is different from the one in welcome.jsp.
: The jsp one still keeps the same session (session id). Weird to me. I am using
: tomcat 5.5.17.
: Any idea about where I should chec

avatar
m*t
3

jsp
another
Are they running in the same _web application_ is the question. Also can you
post how you form the link to call the struts action in welcome.jsp?

【在 j***c 的大作中提到】
: I have a login.jsp page and it directs to welcome.jsp page. Inside welcome.jsp
: page, it has one link to call struts action and another link to call another
: jsp. All jsp and struts are running within the same browser.
: However, I debug and find struts one always creates a new session, because I
: print out its session id and the id is different from the one in welcome.jsp.
: The jsp one still keeps the same session (session id). Weird to me. I am using
: tomcat 5.5.17.
: Any idea about where I should chec

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。