Excellent! It is the way to do it. Thank you for your guidance. It is very dumb of me not to think of it. --- Barry Volpe <[EMAIL PROTECTED]> wrote: > I go directly to the welcome page this way: > > > struts-config: > > <action path="/Logoff" > type="com.childrencare.LogoffAction"> > <forward > name="success" > path="/index.jsp"/> > </action> > > In action: > public final class LogoffAction extends Action { > > public ActionForward execute(ActionMapping mapping, > > ActionForm form, > > HttpServletRequest request, > > HttpServletResponse response) > > throws IOException, ServletException { > > // Extract attributes we will need > > HttpSession session = request.getSession(); > > > > String user = (String) > > session.getAttribute(Constants.USER_KEY); > > // Remove user login > > session.removeAttribute(Constants.USER_KEY); > > // Return success > > return (mapping.findForward(Constants.SUCCESS)); > > Barry > > > > > > > > > > ----- Original Message ----- > From: "Caroline Jen" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" > <[EMAIL PROTECTED]> > Sent: Tuesday, October 28, 2003 6:02 PM > Subject: RE: Forward Cannot Be Achieved In One Step > > > > I have tried your suggestion. It still takes two > > steps to go back to the welcome page. > > > > As long as there are two actions in between, it > does > > not seem that I can go directly from "clicking the > > LOGOUT buttion" to "have the welcome page > displayed". > > > > I really wish to learn what people usually do - > the > > first one of those two actions is Logoff.java in > which > > I invalidate the session, ..., etc. and the second > > action upon success will lead the user to the > welcome > > page in which choices available for unregistered > > members plus a LOGON buttion are provided. > > > > -Caroline > > > > --- Yansheng Lin <[EMAIL PROTECTED]> wrote: > > > At the end of your first action execute() > method, do > > > > > > a redirect to the second action. Something like > the > > > following: > > > return new ActionForward("secondAction.do"); > > > > > > Hope this helps! > > > > > > -Yan > > > > > > -----Original Message----- > > > From: Caroline Jen [mailto:[EMAIL PROTECTED] > > > > Sent: October 28, 2003 2:51 PM > > > To: Struts Users Mailing List > > > Subject: RE: Forward Cannot Be Achieved In One > Step > > > > > > > > > Let me re-phrase my question. > > > > > > Upon the user click on the LOGOUT buttion, I > have > > > two > > > actions - the first one of the actions is > > > Logoff.java > > > in which I invalidate the session, ..., etc. and > the > > > second action upon success will lead the user to > the > > > welcome page in which choices for unregistered > > > member > > > plus a LOGON buttion is provided. > > > > > > As long as two actions are involved, the user > does > > > not > > > get back to the welcome page by just click on > the > > > LOGOFF button "only once". > > > > > > Need your guidance on how such a situation is > > > usually > > > handled? > > > > > > > > > --- Caroline Jen <[EMAIL PROTECTED]> wrote: > > > > Thanks for the reply. Now, I understand that > I > > > have > > > > two actions. However, I do quite understand > what > > > > you > > > > suggested. You said: > > > > > > > > u can also use > > > > <html:link action="/Logoff">logoff</html:link> > > > > where logoff is ur global forward. > > > > <html:link > forward="/Logoff">logoff</html:link> > > > > > > > > I still have two actions if I use > > > > <html:link > action="/do/Logoff">logoff</html:link> > > > > > > > > because I have > > > > > > > > <action > > > > path="/Logoff" > > > > > > > > > > > > type="org.NameOfOrganization.signoff.LogoffAction"> > > > > <forward > > > > name="success" > > > > path="/do/Menu"/> > > > > </action> > > > > > > > > In the LogoffAction.java, I invalidate the > session > > > > and I want the user to go back the welcome > page. > > > > And > > > > > > > > <action > > > > path="/Menu" > > > > name="menuForm" > > > > > > > > > > type="org.apache.struts.scaffold.ExistsAttributeAction" > > > > parameter="application;HOURS"> > > > > <forward > > > > name="success" > > > > path=".article.Menu"/> > > > > <forward > > > > name="failure" > > > > path="/do/MenuCreate"/> > > > > > > > > The .article.Menu is my tile that displays the > > > > welcome > > > > page. > > > > > > > > > > > > > > > > --- [EMAIL PROTECTED] wrote: > > > > > u can also use > > > > > <html:link > action="/Logoff">logoff</html:link> > > > > > where logoff is ur global forward. > > > > > <html:link > forward="/Logoff">logoff</html:link> > > > > > hence it wont be a 2 step stuff but directly > > > > calling > > > > > ur Action class which does cleanup work for > the > === message truncated ===
__________________________________ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]