softlab Posted February 10, 2018 Posted February 10, 2018 Hi. I have a web app on Johnny. In my servlet a set some attributes in session, but when I make another request the attributes are lost. I have session-timeout in my web.xml set to 20, that should be minutes. Can you help me? Thanks Quote
Krydos Posted February 10, 2018 Posted February 10, 2018 Have you tried appending your username to the front of the .war (bfpsw_JAW) before you deploy it? I think other people have said that they've had issues with sessions if they don't append their username to the front. Quote
softlab Posted February 10, 2018 Author Posted February 10, 2018 Ok. I'll try and let you know. Thanks Quote
softlab Posted February 10, 2018 Author Posted February 10, 2018 I tried, but it seems the problem has not been solved. I put in session an attribute in the "doPost" method of a servlet, but the subsequent request does not see it, the parameter is not present in session... Quote
Krydos Posted February 10, 2018 Posted February 10, 2018 Nope. You're probably the first to try this. Let us know if you figure it out so we can help other people with similar issues in the future. Quote
softlab Posted February 12, 2018 Author Posted February 12, 2018 (edited) I think I've solved. Searching on Google I found a post on StackOverflow giving a possible solution for the problem I faced; the last deploy of my web app seems to work well, and session attributes seem to be conserved. Here the link to the post: https://stackoverflow.com/questions/2138245/session-is-lost-and-created-as-new-in-every-servlet-request. Hope it helps P.S. - The second answer to the post Edited February 12, 2018 by softlab Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.