Javaweb problems caused by the naming of the project (The Rhythm of Death)

Source: Internet
Author: User

There was a strange problem with the three-tier Web project. I set the object parameter through Session.setattribute in the user login servlet (login), in theory, after the successful login, the parameter is passed successfully, and the value of the object parameter can be obtained through session.getattribute in other servlets, but it is nul L value, test a lot of times are not, searched a lot of information and did not find the problem. What session expires, what TTOMCAT configuration file modification Ah, what redirects will cause the session to expire Ah, go to look at Tomcat source code, see if it is used to redirect the session destroyed, in the end is not, the head is going to explode.

There is really no way to build a new code called Test, which runs under this project is no problem, so guess is the project naming problems. The project name was changed from code_20150407 (shopping) to code_20150407_shopping in order to differentiate the project type. Then I revert the project name back to the original and the problem comes up again. This naming question I think may be the key, project naming should not contain "(", "+" and so on these symbols, otherwise there will be problems.)

This problem took too long, last night two or three days did not solve, today carefully thought, verified the next own conjecture solved. This reminds me that after the project naming to standardize, indeed also verified, program failure three eternal law: Restart the computer + restart ide+ check name.

Javaweb problems caused by the naming of the project (The Rhythm of Death)

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.