Thanks for reply. Ok I got what I need. I will do this. In struts-config.xml I will put 5 ForwardActions like this <action path="/Sales_Home" forward="/sales/index.jsp"/> <action path="/HR_Home" forward="/hr/index.jsp"/> etc. At login time a parameter wil be put in the session 'home' with a value of each users home which is the path attribute of action element defined earlier. In every JSP the link is provided like this. <html:link action="<%=session.getAttribute("home").toString()%>">Log out</html:link> This will work in JSP's. But how to invoke this action from another action class. I have to construct a new ActionForward like this. return new ActionForward("/home.do");
Also how to invoke global forward from action class. rgds Antony Paul ----- Original Message ----- From: "Ted Husted" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Tuesday, December 09, 2003 9:31 PM Subject: Re: How to set action path from Action. > The different entry points should each be represented by their own > ActionForwards. The Action class decides to forward the user to > "science" or "biology". The ActionForward supplies the page and directory. > > Generally, it is helpful to think of the ActionForwards as boxes on a > flowchart. The Action class encapsulates the logic that decides it is > time to forward to this box or that box. The directory and pages are > implmentation details. The focal point is the *logical* names of the > ActionForward, not the paths they encapsulate. > > HTH, Ted. > > Antony Paul wrote: > > Hi, > > After user login based on the dept of user user has to forwarded to > > pages in different directories. How to do it ?. There are 5 departments. > > This directory and page to be used in other parts to identify the home page > > and directory of user so at other times user can be redirected. Putting a > > ForwardAction in struts-config.xml which accepts and checks a single > > parameter(Home) is possible ? Or set the path of a global forward at > > runtime. I am new to Struts. Other options are > > 1. Write another action class which takes this parameter and based on the > > user dept got from session invoke corresponding ForwardAction. This action > > is reached through a global forward. > > 2. Use modules. I dont know what is it. Is it possible to have same named > > ForwardAction in different modules ?. > > > > rgds > > Antony Paul. > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]