You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Mauricio T. Ferraz" <ma...@cilix.com.br> on 2004/01/09 20:51:46 UTC
Action to JSP
There are a way to:
When a click in a link in my jsp page, in address bar in my browser dont write the name of the action, and go direct to the jsp page (defined in action forward) ???
Thanks.
Mauricio
Re: Action to JSP - Works!!!
Posted by Brice Ruth <br...@fiskars.com>.
be aware that this is not a good thing to do "in general" ... as you'll
never be able to make use of the request scope for variables which
*will* bite you at some point down the road.
If someone doesn't like the *.do at the end of the action name, then you
really need to address a solution other than redirecting everything to JSPs.
Just my $0.02.
Mauricio T. Ferraz wrote:
>Thanks People
>
>Works!!!
>
>Thanks Geeta for the solution
>
>[]´s
>Mauricio
>
>
>----- Original Message -----
>From: "Geeta Ramani" <ge...@cmpco.com>
>To: "Struts Users Mailing List" <st...@jakarta.apache.org>
>Sent: Friday, January 09, 2004 6:06 PM
>Subject: Re: Action to JSP
>
>
>
>
>>The easiest way is perhaps to simply add a "redirect=true" in your action
>>
>>
>mapping. However, be aware that this will kill your request attributes
>(since your request
>
>
>>object is no longer forwarded..)
>>
>>Regards,
>>Geeta
>>
>>"Mauricio T. Ferraz" wrote:
>>
>>
>>
>>>There are a way to:
>>>
>>>When a click in a link in my jsp page, in address bar in my browser dont
>>>
>>>
>write the name of the action, and go direct to the jsp page (defined in
>action forward) ???
>
>
>>>Thanks.
>>>Mauricio
>>>
>>>
>>---------------------------------------------------------------------
>>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
>
>
>
--
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
Re: Action to JSP - Works!!!
Posted by "Mauricio T. Ferraz" <ma...@cilix.com.br>.
Thanks People
Works!!!
Thanks Geeta for the solution
[]´s
Mauricio
----- Original Message -----
From: "Geeta Ramani" <ge...@cmpco.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Friday, January 09, 2004 6:06 PM
Subject: Re: Action to JSP
> The easiest way is perhaps to simply add a "redirect=true" in your action
mapping. However, be aware that this will kill your request attributes
(since your request
> object is no longer forwarded..)
>
> Regards,
> Geeta
>
> "Mauricio T. Ferraz" wrote:
>
> > There are a way to:
> >
> > When a click in a link in my jsp page, in address bar in my browser dont
write the name of the action, and go direct to the jsp page (defined in
action forward) ???
> >
> > Thanks.
> > Mauricio
>
>
> ---------------------------------------------------------------------
> 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: Action to JSP
Posted by "Craig R. McClanahan" <cr...@apache.org>.
Quoting Geeta Ramani <ge...@cmpco.com>:
> The easiest way is perhaps to simply add a "redirect=true" in your action
> mapping. However, be aware that this will kill your request attributes
> (since your request
> object is no longer forwarded..)
>
Geeta's warning about one consequence is quite correct. So is the warning that
you're going to make the performance of your application worse, because a
redirect requires an extra round trip to the client (a forward is basically a
glorified subroutine call that happens only on the server, which is why the
browser doesn't change it's address -- it never knew what happened).
<personal-opinion>
In a web *applicaton* (as opposed to a web *site*), URLs should be thought of as
an internal implementation detail, not a primary user-accessible feature. If
you find your users getting distracted by the displayed URLs (or, worse, trying
to bookmark them, which will never work unless your app takes pains to make it
work), consider creating a frameset with a single frame in it (so the shown
address never changes), or use JavaScript to create a new window that does not
have a location bar.
Other folks will disagree with me on this, of course, but in my general response
is "show me where the back button and bookmarks window are in a Swing app, and
I'll make them available in my web app." :-)
</personal-opinion>
> Regards,
> Geeta
>
Craig McClanahan
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Action to JSP
Posted by Geeta Ramani <ge...@cmpco.com>.
The easiest way is perhaps to simply add a "redirect=true" in your action mapping. However, be aware that this will kill your request attributes (since your request
object is no longer forwarded..)
Regards,
Geeta
"Mauricio T. Ferraz" wrote:
> There are a way to:
>
> When a click in a link in my jsp page, in address bar in my browser dont write the name of the action, and go direct to the jsp page (defined in action forward) ???
>
> Thanks.
> Mauricio
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org