Home > front end >  The session value loss problem
The session value loss problem

Time:09-30

After the page refresh or click on a hyperlink, the session before the stored value all lost, I think may be opened a new session window then sessionId to refresh, but I used to previous sessionId to get the session is empty,
Then I looked at someone sent a piece of code so
 & lt; script> 
The session. Use_trans_sid=1;
The session. Use_only_cookies=0;
</script>

I put this code in the jump in front of the page after the values can be passed, but I can only transfer part of the backend Java code below
 
Request. GetSession (). The setAttribute (CDUTConstants USER_SESSION, user);
//the current contact
Request. GetSession (). The setAttribute (" phone ", username);

Of the two assignment in another page for less than the former, but the latter can access to the new page, don't know why

CodePudding user response:

As with js code it doesn't matter
  • Related