You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Caroline Jen <ji...@yahoo.com> on 2003/10/28 17:42:31 UTC

Forward Cannot Be Achieved In One Step

Hi, I have the following code in the navbarMenu.jsp:

<html:link forward="exit">LOGOUT</html:link>

and in the struts-config.xml, I have:

<forward
   name="exit"
   path="/do/Logoff"/>

and 

<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.

The problem is that it takes two steps for the user to
go back to the welcome page - After the first click,
the same screen remains in the browser.  The only
change is what is shown in the address bar.  I have to
click the LOGOFF button again and then the welcome
page is displayed.  

What should I do to go back to the welcome page in one step?

__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Forward Cannot Be Achieved In One Step

Posted by Geeta Ramani <ge...@cmpco.com>.
Caroline:

ok, I didn't sleep enough last night so I may be blabbering(:(, but why
don't you simply say:

<html:link page="/Logoff">LOGOUT</html:link>

and lose the "forward" entry in your struts-config.xml?

Geeta

Caroline Jen wrote:

> The do/Menu "does" display my welcome page.  The
> LOGOUT button and forward "does" eventually lead the
> visitor to the welcome page.  The problem is that it
> takes two steps intead of going straight to the
> welcome page.  Let me re-state my problem:
>
> I have the following code in the navbarMenu.jsp:
>
> <html:link forward="exit">LOGOUT</html:link>
>
> and in the struts-config.xml, I have:
>
> <forward
>    name="exit"
>    path="/do/Logoff"/>
>
> and
>
> <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.
>
> The problem is that it takes two steps for the user to
> go back to the welcome page - After the first click,
> the same screen remains in the browser.  The only
> change is what is shown in the address bar.  I have to
> click the LOGOFF button "again" and then the welcome
> page is displayed.
>
> What should I do to go back to the welcome page in one
> step?
>
> --- "Ruth, Brice" <br...@fiskars.com> wrote:
> > Is your "Menu" actionforward the welcome screen you
> > want to get to? And
> > does your Action return an ActionForward to this?
> >
> > Caroline Jen wrote:
> >
> > >Hi, I have the following code in the
> > navbarMenu.jsp:
> > >
> > ><html:link forward="exit">LOGOUT</html:link>
> > >
> > >and in the struts-config.xml, I have:
> > >
> > ><forward
> > >   name="exit"
> > >   path="/do/Logoff"/>
> > >
> > >and
> > >
> > ><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.
> > >
> > >The problem is that it takes two steps for the user
> > to
> > >go back to the welcome page - After the first
> > click,
> > >the same screen remains in the browser.  The only
> > >change is what is shown in the address bar.  I have
> > to
> > >click the LOGOFF button again and then the welcome
> > >page is displayed.
> > >
> > >What should I do to go back to the welcome page in
> > one step?
> > >
> > >__________________________________
> > >Do you Yahoo!?
> > >Exclusive Video Premiere - Britney Spears
> > >http://launch.yahoo.com/promos/britneyspears/
> > >
> >
> >---------------------------------------------------------------------
> > >To unsubscribe, e-mail:
> > struts-user-unsubscribe@jakarta.apache.org
> > >For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > >
> > >
> > >
> >
> > --
> > Brice D. Ruth
> > Sr. IT Analyst
> > Fiskars Brands, Inc.
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> >
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Forward Cannot Be Achieved In One Step

Posted by Caroline Jen <ji...@yahoo.com>.
The do/Menu "does" display my welcome page.  The
LOGOUT button and forward "does" eventually lead the
visitor to the welcome page.  The problem is that it
takes two steps intead of going straight to the
welcome page.  Let me re-state my problem:

I have the following code in the navbarMenu.jsp:

<html:link forward="exit">LOGOUT</html:link>

and in the struts-config.xml, I have:

<forward
   name="exit"
   path="/do/Logoff"/>

and 

<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.

The problem is that it takes two steps for the user to
go back to the welcome page - After the first click,
the same screen remains in the browser.  The only
change is what is shown in the address bar.  I have to
click the LOGOFF button "again" and then the welcome
page is displayed.  

What should I do to go back to the welcome page in one
step?

--- "Ruth, Brice" <br...@fiskars.com> wrote:
> Is your "Menu" actionforward the welcome screen you
> want to get to? And 
> does your Action return an ActionForward to this?
> 
> Caroline Jen wrote:
> 
> >Hi, I have the following code in the
> navbarMenu.jsp:
> >
> ><html:link forward="exit">LOGOUT</html:link>
> >
> >and in the struts-config.xml, I have:
> >
> ><forward
> >   name="exit"
> >   path="/do/Logoff"/>
> >
> >and 
> >
> ><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.
> >
> >The problem is that it takes two steps for the user
> to
> >go back to the welcome page - After the first
> click,
> >the same screen remains in the browser.  The only
> >change is what is shown in the address bar.  I have
> to
> >click the LOGOFF button again and then the welcome
> >page is displayed.  
> >
> >What should I do to go back to the welcome page in
> one step?
> >
> >__________________________________
> >Do you Yahoo!?
> >Exclusive Video Premiere - Britney Spears
> >http://launch.yahoo.com/promos/britneyspears/
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> >
> >  
> >
> 
> -- 
> Brice D. Ruth
> Sr. IT Analyst
> Fiskars Brands, Inc.
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Forward Cannot Be Achieved In One Step

Posted by "Ruth, Brice" <br...@fiskars.com>.
Is your "Menu" actionforward the welcome screen you want to get to? And 
does your Action return an ActionForward to this?

Caroline Jen wrote:

>Hi, I have the following code in the navbarMenu.jsp:
>
><html:link forward="exit">LOGOUT</html:link>
>
>and in the struts-config.xml, I have:
>
><forward
>   name="exit"
>   path="/do/Logoff"/>
>
>and 
>
><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.
>
>The problem is that it takes two steps for the user to
>go back to the welcome page - After the first click,
>the same screen remains in the browser.  The only
>change is what is shown in the address bar.  I have to
>click the LOGOFF button again and then the welcome
>page is displayed.  
>
>What should I do to go back to the welcome page in one step?
>
>__________________________________
>Do you Yahoo!?
>Exclusive Video Premiere - Britney Spears
>http://launch.yahoo.com/promos/britneyspears/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>  
>

-- 
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org