This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
In our application we are redirecting from one action(loginAction) to another action(MenuAction) using struts 2.0 tag(redirectAction) in struts-config.xml.
In LoginAction if user is authenticate then we are creating new session and storing the user information and redirection to request to another action i.e. MenuAction. In MenuAction we are validating user information.If user is validated then we are displaying MenuPage to user.
Redirection of action it is working fine on local mahine and dev env because there is no load balancer. But on QA env there is load balancer and two application is deployed on two different server. So there is some issue while redirecting request from one action to another action.
We have configure load balance in such way that, LB(Load Balancer) will transfer the request on the basic of cookie parameter. In our action we are setting the cookie value as weblogic server name.So LB will transfer the request to application server depengding the upon the cookie value(weblogic name) received in request.
Here is issue, while we are redirecting request from loginAction to MenuAction, if LB transfer the request to another server2(suppose session is created on Server1) then MenuAction is not able to find session. Because there is no session is created on Server2. If LB transfer the request to same server(server1) then it will work fine.
So it means browser clearing the cookie value when we are redirecting request from one action another. On browser cookie is enabled. So can anybody help me to resolve this issue.
subject: Redirection of action clearing cookie parameter leading to mis behave of application