Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Servlets and the fly likes Session management problem in response.sendRedirect Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session management problem in response.sendRedirect" Watch "Session management problem in response.sendRedirect" New topic

Session management problem in response.sendRedirect

kamal kumar sharma

Joined: Jul 26, 2011
Posts: 9

I am facing an issue which i describe below.

Our application has request flow is like below.

Client -----> Apache HTTP 2.2.3(1) ---->JONAS 5.2.2
in this configuration the response.sendRedirect() is working well,there is no issue of session.

However as per new requirement we have to introduce a new Apache HTTP server in front of JOnAS server.

Client------> Apache HTTP 2.2.3(1) ---> Apache 2.2.3(2)---->JOnAS 5.2.2.

Now the problem starts,the response.sendRedirect() is no more working well. Apache 2.2.3(2) is unable to maintain the previous session.The request.getSession() is creating new sessionId rather than using the previous one.
How ever if we replace the sendRedirect with requestDispatcher.forward() it work's well.I am unable to understand the problem.


I agree. Here's the link:
subject: Session management problem in response.sendRedirect
It's not a secret anymore!