Struts2 a new session will be created for each visit

Source: Internet
Author: User

Project in the test process, suddenly found that after landing to visit other menus will be prompted not to log in;

After viewing the log, it is difficult to understand that a new session will be created automatically when many requests are made.

Because before also did not change what session created mechanism, Tomcat did not change, but suddenly this, and common sense does not work;

After multi-party debugging, remove Tomcat reinstall, redeploy the project, and then the same session at the request, back to normal!

Why? Why?

Search on the Internet a Good article:

1, http://m.blog.csdn.net/blog/www89404565/2070710

2, http://bbs.csdn.net/topics/380141840

3. Whether request.getsession (true) is used in your interceptor; This way gets the session
What is the session expiration time configured in Web. xml?

Put it here first, and then update the blog post if you find the problem later

Struts2 a new session will be created for each visit

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.