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.
I am from Germany and I am happy if you correct my English because it is the only way to improve it.
You mentioned that your client is an Android app. You need to check if the Android services support cookies or not -- I have no idea. Cookies are the default means by which sessions are maintained across requests.
If not, and there's no way to enable that, you might look into URL re-writing.