I want my web application to contain only one session created at login. But my server is creating a separate session for every request to a jsp page. How can I configure to have only one session in my application?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If either a sessionId is supplied with every link the user clicks is submitted
or
cookies are used
the server can associate the request with a particular user. Otherwise a new session will be created.
EDIT:
for adding links to your URLs in case you dont have cookies … there are some ways to do this. Either set the sessionId manually
or use the struts-taglibs to that for you https://struts.apache.org/1.2.x/userGuide/struts-html.html#link
The taglib then rewrites the link for you. It should look like this (not tested):