I have a jsp(say,one.jsp) and it requests another jsp(say,two.jsp).From here, it is redirected to another jsp(say,three.jsp and this is in another web application.) one.jsp and two.jsp both are in another web application. and all together are in same web server(Tomcat).
The problem is, I inserted a value in session object in one.jsp. I am trying to retrieve this value from three.jsp.I am unable to get this value.
How can I get this value.
For this, I felt a solution.That is data(for example,userID) sent to another web-app, append this data value as query string while redirecting to anothe web-app.
In recepient.jsp, use request.getParameter("userID").
Is it the right solution?
Are there any better solution?
William Brogden wrote:"no way to do this?"
Not with a session object as managed by the server but there are plenty of ways to share information between web applications.
For example - serialized object with a unique ID stored in a data base or on disk.
Thanks, and it is possible only with the shared database?
I would only do this for a small amount of non-sensitive data. if you have a lot of data, or it contains sensitive information, I'd also advocate the single web application idea that several commentators have already hit on.