Hello Community,
I stuck with a problem I can't find a solution to and I already tried to get help on stackoverflow (
https://stackoverflow.com/questions/49572255/how-to-restore-a-session-in-a-servlet-created-in-another-on-glassfishv4) but because nobody could help me there I would like to ask here too, maybe here are the experts that can point out what I am doing wrong.
I am using Servlets to provide a webservice to an android app. My problem is that I create two objects in my LogonServlet which I would like to restore in my other servlets:
What I am aiming to do:
I want to create different servlets. One of these is my LogonServlet which creates and Object which deals with RFCs to a SAP. This object I want to restore on my other servlets for the same session.
What I have done so far:
LogonServlet: (no real user authentification because I am still testing functionality)
The code of a different servlet to restore the session variables:
The problem is that it always returns "null" for the session.
This is my web.xml
I have no clue what I am doing wrong. It could be some setup I need to activate in glassfish v4 or something I have to do in the client that the server knows I would like to continue the session. This is my first project with javaEE, glassfish and servlets.
Thank you very much in advance.