Struts redirection of action clearing cookie parameter leading mis behave of application

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.

Category:struts2 Time:2010-11-29 Views:3
Tags: struts2

Related post

  • Redirecting to action preserves routing parameter invalid on new action 2011-02-16

    Here are my routes: _routes = RouteTable.Routes; _routes.Clear(); _routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); _routes.IgnoreRoute("{*favicon}", new {favicon = @"(.*/)?favicon.ico(/.*)?"}); _routes.MapRoute( "Message-specific Actions", "Message

  • ActionFilterAttribute redirect to action method with parameter 2011-03-13

    I have made a custom access checking ActionFilterAttribute which I want to redirect to an error page if they do not have sufficient access. Here is what I have so far. RouteValueDictionary routeValues = new RouteValueDictionary(new { action = "Error"

  • Redirecting to action with a parameter 2011-11-25

    Let's say I have a website that displays info about books. The info about a specific book can be seen on a page with the url "/Book/Show/1234", where 1234 is the id of the book. To edit the information about the book, there's a link on the book page

  • Struts 1 redirect from action to action with parameters as POST request 2013-06-14

    now am trying to redirect to action class from action class with some parameters in my struts 1.3 web application, here is my code ActionRedirect redirect = new ActionRedirect(mapping.findForward(forwardPage)); redirect.addParameter("method", forward

  • Struts 2 Framework - Redirect to Action 2011-07-10

    Good day! I am currently studying Struts 2 and I am quite confused with the xml. I don't know where to start. I want my index.jsp to go to my Display Action Class So My codes is as follows: index.jsp <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Tra

  • In struts 2 how to call method of same action with passing parameter along with method call 2011-07-08

    I wanted to make a call to a method of same action and pass parameter to it. Can anybody tell me how can i make a call to it. Usually in action class if same class method is called in another method of same class then just we write : return methodNam

  • Redirect to action and need to pass data 2010-07-29

    I have a controller that handles three actions that are specific to my problem. The first is the edit action which returns a view with an HTML form that the user can edit properties on the given item. The second is the update action which accepts the

  • Tiles, Struts 2, chained actions, and passing through put-attribute values 2011-06-21

    I'm writing a search engine to explore multiple search algorithms. The web portion floats on Struts 2.1.6 and Tiles 2.2.2. It's currently a complete mess, so below I've factored out a simplified version to focus on the exact problem I'm having. The n

  • how to redirect struts2 action to a url after validation? 2011-08-17

    I have a action with a url creation like this if (this.sequence.equals("") ) { action= "input"; } else {url = "/files/" + testHTML.getName(); action= "redirect"; } return action; in my struts.xml my action is declarated has <interceptor-ref name="

  • Asp.net MVC Form Post to Action with missing parameter initialization 2010-03-07

    I am having trouble with an ASP.net MVC form Posting to an Action containing multiple parameters. The problem is only some of the parameters are being initialized. The page has multiple forms each backed by a separate controller. The controller actio

  • Struts 2 s:action tag doesn't render action errors if any are present 2010-10-28

    For example I have the following: struts.xml: <action name="personForm"> <result>/jsp/personForm.jsp</result> </action> <action name="savePerson"> <result>/jsp/successSave.jsp</result> <result name="input"

  • How to redirect to action from JavaScript method? 2011-03-17

    I have an input type="button" <input type="button" name="DeleteJob" runat="server" value="Löschen" onclick="DeleteJob()" /> and JavaScript method: function DeleteJob() { if (confirm("Do you really want to delete selected job/s?")) return true;

  • Can we create a new instance for struts 1.x action classes each time? 2011-11-09

    The action classes of struts 1.x is inherently not thread safe since the struts caches the action classes and uses it for other requests too. Is there any way we can configure struts 1.x action classes in such a way that a new instance of the action

  • Redirect to action of controller using ajax call 2012-03-21

    I am using jquery ajax call and in controller action i want to redirect some action but when i use redirect_to "/some_action". Then it did not redirect to my desired action please give any useful suggestions. <%= link_to "javascript:;" ,:onclick =

  • MVC3 redirect to action after ajax call 2012-04-16

    In an ASP.NET MVC3 Application I have a button in the view. When the button is clicked a function is called and it jquery ajax call is made to save items to the database function SaveMenuItems() { var encodeditems = $.toJSON(ids);; $.ajax({ type: 'PO

  • Using request object parameter as a name of application scope attriubte in JSP 2010-08-21

    I have a request object with String attribute name1. When request is sent to JSP I would like to use name1 parameter as a name of application scope bean to retrieve its status. I have tried <jsp:getProperty name="${name1}" property="status" />

  • Sharing cookies across different domains and different applications (classic ASP and ASP.NET) 2011-01-24

    Is there a way to share cookies across different domains and different applications (classic ASP and ASP.NET) --------------Solutions------------- No, there isn't. The issue is the cross domain one, rather than the asp.net/classic asp and is security

  • asp.net mvc redirect to action and passing a parameter from user input 2011-03-02

    I have a page with a input box and a button, when the user clicks the button i want to redirect to a controller action that has as parameter the value of the input box. <input id="CodProiect" type="text" /> <input id="Cauta" type="button" va

  • How can I pass a parameter or value from one view to another through a redirect to action? 2011-12-05

    I have a 'login' view and a 'reset password' view in my MVC project. After a successful reset password action, I redirect back to the 'login' view. I'd like the 'login' view to have a means of checking whether a successful password reset has just hap

Copyright (C) pcaskme.com, All Rights Reserved.

processed in 0.514 (s). 13 q(s)