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
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.
softlab Posted February 10, 2018 Author Posted February 10, 2018 Ok. I'll try and let you know. Thanks
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...
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.
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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now