aspose file tools*
The moose likes Struts and the fly likes Redirection of action clearing cookie parameter leading to mis behave of application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Redirection of action clearing cookie parameter leading to mis behave of application" Watch "Redirection of action clearing cookie parameter leading to mis behave of application" New topic
Author

Redirection of action clearing cookie parameter leading to mis behave of application

Java Struts
Greenhorn

Joined: Nov 29, 2010
Posts: 1
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Redirection of action clearing cookie parameter leading to mis behave of application