Re: is this posible? return to the same page after being executed

2004-05-05 Thread Curtis Taylor
Hi Julio,

There are 2 ways I'm aware of:

1.) In your struts-config.xml action-mappings, add a "success" mapping that 
points to your mapping path; i.e.:

  

  
Then, in your action class, return mapping.findForward("Success");

and you're done. (Note the ".do" required in the forward; thanks particularly to 
Hubert Rabago for making the little lightbulb go off over my head on this ;-)

2.) If you're using a Dispatch action and a "CRUD" type design where you 
populate your form with a method called for example, "populateData," simply 
refer to that method for the return in the other "letters" of your action class:

return this.populateData(mapping, form, request, response);

and you're done (thanks to co-worker Glenn Wilson for pointing this one out to me).

HTH,

Curtis

Julio Cesar De Salvo wrote:

Is there some way to return to the page / action that called to action
that is being executed?
I've 1 jsp that forwards to an action and I would like to return to the
same page that called the action, by setting the path in the
ActionForward object.
 
Thanks.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: is this posible? return to the same page after being executed

2004-05-05 Thread Geeta Ramani
ah yes, that's what i was afraid of ( - what i meant by "many ways of getting to that 
action etc..").. 
I suppose you don't want to use hidden vars..? Because that may be a simple solution 
to your problem.. :)

> -Original Message-
> From: Julio Cesar De Salvo [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 05, 2004 12:48 PM
> To: 'Struts Users Mailing List'
> Subject: RE: is this posible? return to the same page after being
> executed
> 
> 
> The issue is that there's multiples ways to call the action 
> that I want
> to come back. So I cannot set this in the struts-config.xml, but maybe
> there's some way to recall the url of the action or jsp inside the
> action that process the request and then come back to the 
> caller action.
> 
> Is that clear?
> 
> Thanks again.
> 
> -Mensaje original-
> De: Geeta Ramani [mailto:[EMAIL PROTECTED] 
> Enviado el: Miércoles, 05 de Mayo de 2004 12:49 p.m.
> Para: Struts Users Mailing List
> Asunto: RE: is this posible? return to the same page after being
> executed
> 
> oh, ok!
> 
> This exact question I think was asked and answered maybe in the past
> month or so - sorry, I don't have the exact reference. So maybe you
> could search the archives - or the poster of that answer will oblige
> again.. (have you looked into HttpServletRequestgetRequestUrl() (going
> from memory so may not be exact..)
> 
> However, before you do that, is there some reason you want a "generic"
> answer? After all, this will be an entry in the struts-config.xml and
> hardcoding there is the norm not the exception.. Unless you have many
> ways of getting to that particular action and .. you know what i
> mean..:) I tend to like simple solutions best - but then again, I
> doubtless don't understand the complexities of your situation..
> 
> Geeta
> 
> > -----Original Message-
> > From: Julio Cesar De Salvo [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, May 05, 2004 11:38 AM
> > To: 'Struts Users Mailing List'
> > Subject: RE: is this posible? return to the same page after being
> > executed
> > 
> > 
> > Yeah... :) what I was trying to ask is what the best way to 
> get in the
> > action the path to the page that originally called the action.
> > 
> > Thnks again.
> > 
> > -Mensaje original-
> > De: Geeta Ramani [mailto:[EMAIL PROTECTED] 
> > Enviado el: Miércoles, 05 de Mayo de 2004 11:56 a.m.
> > Para: Struts Users Mailing List
> > Asunto: RE: is this posible? return to the same page after being
> > executed
> > 
> > Yes, this will work: try it! :)
> > 
> > Geeta
> > 
> > > -Original Message-
> > > From: Julio Cesar De Salvo [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, May 05, 2004 11:06 AM
> > > To: 'Struts Users Mailing List'
> > > Subject: is this posible? return to the same page after 
> > being executed
> > > 
> > > 
> > > Is there some way to return to the page / action that 
> > called to action
> > > that is being executed?
> > > I've 1 jsp that forwards to an action and I would like to 
> > > return to the
> > > same page that called the action, by setting the path in the
> > > ActionForward object.
> > >  
> > > Thanks.
> > > 
> > 
> > 
> -
> > 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]
> 
> 
> -
> 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]



RE: is this posible? return to the same page after being executed

2004-05-05 Thread Julio Cesar De Salvo
The issue is that there's multiples ways to call the action that I want
to come back. So I cannot set this in the struts-config.xml, but maybe
there's some way to recall the url of the action or jsp inside the
action that process the request and then come back to the caller action.

Is that clear?

Thanks again.

-Mensaje original-
De: Geeta Ramani [mailto:[EMAIL PROTECTED] 
Enviado el: Miércoles, 05 de Mayo de 2004 12:49 p.m.
Para: Struts Users Mailing List
Asunto: RE: is this posible? return to the same page after being
executed

oh, ok!

This exact question I think was asked and answered maybe in the past
month or so - sorry, I don't have the exact reference. So maybe you
could search the archives - or the poster of that answer will oblige
again.. (have you looked into HttpServletRequestgetRequestUrl() (going
from memory so may not be exact..)

However, before you do that, is there some reason you want a "generic"
answer? After all, this will be an entry in the struts-config.xml and
hardcoding there is the norm not the exception.. Unless you have many
ways of getting to that particular action and .. you know what i
mean..:) I tend to like simple solutions best - but then again, I
doubtless don't understand the complexities of your situation..

Geeta

> -Original Message-
> From: Julio Cesar De Salvo [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 05, 2004 11:38 AM
> To: 'Struts Users Mailing List'
> Subject: RE: is this posible? return to the same page after being
> executed
> 
> 
> Yeah... :) what I was trying to ask is what the best way to get in the
> action the path to the page that originally called the action.
> 
> Thnks again.
> 
> -Mensaje original-
> De: Geeta Ramani [mailto:[EMAIL PROTECTED] 
> Enviado el: Miércoles, 05 de Mayo de 2004 11:56 a.m.
> Para: Struts Users Mailing List
> Asunto: RE: is this posible? return to the same page after being
> executed
> 
> Yes, this will work: try it! :)
> 
> Geeta
> 
> > -Original Message-
> > From: Julio Cesar De Salvo [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, May 05, 2004 11:06 AM
> > To: 'Struts Users Mailing List'
> > Subject: is this posible? return to the same page after 
> being executed
> > 
> > 
> > Is there some way to return to the page / action that 
> called to action
> > that is being executed?
> > I've 1 jsp that forwards to an action and I would like to 
> > return to the
> > same page that called the action, by setting the path in the
> > ActionForward object.
> >  
> > Thanks.
> > 
> 
> -
> 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]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: is this posible? return to the same page after being executed

2004-05-05 Thread Geeta Ramani
oh, ok!

This exact question I think was asked and answered maybe in the past month or so - 
sorry, I don't have the exact reference. So maybe you could search the archives - or 
the poster of that answer will oblige again.. (have you looked into 
HttpServletRequestgetRequestUrl() (going from memory so may not be exact..)

However, before you do that, is there some reason you want a "generic" answer? After 
all, this will be an entry in the struts-config.xml and hardcoding there is the norm 
not the exception.. Unless you have many ways of getting to that particular action and 
.. you know what i mean..:) I tend to like simple solutions best - but then again, I 
doubtless don't understand the complexities of your situation..

Geeta

> -Original Message-
> From: Julio Cesar De Salvo [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 05, 2004 11:38 AM
> To: 'Struts Users Mailing List'
> Subject: RE: is this posible? return to the same page after being
> executed
> 
> 
> Yeah... :) what I was trying to ask is what the best way to get in the
> action the path to the page that originally called the action.
> 
> Thnks again.
> 
> -Mensaje original-
> De: Geeta Ramani [mailto:[EMAIL PROTECTED] 
> Enviado el: Miércoles, 05 de Mayo de 2004 11:56 a.m.
> Para: Struts Users Mailing List
> Asunto: RE: is this posible? return to the same page after being
> executed
> 
> Yes, this will work: try it! :)
> 
> Geeta
> 
> > -Original Message-
> > From: Julio Cesar De Salvo [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, May 05, 2004 11:06 AM
> > To: 'Struts Users Mailing List'
> > Subject: is this posible? return to the same page after 
> being executed
> > 
> > 
> > Is there some way to return to the page / action that 
> called to action
> > that is being executed?
> > I've 1 jsp that forwards to an action and I would like to 
> > return to the
> > same page that called the action, by setting the path in the
> > ActionForward object.
> >  
> > Thanks.
> > 
> 
> -
> 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]



RE: is this posible? return to the same page after being executed

2004-05-05 Thread Julio Cesar De Salvo
Yeah... :) what I was trying to ask is what the best way to get in the
action the path to the page that originally called the action.

Thnks again.

-Mensaje original-
De: Geeta Ramani [mailto:[EMAIL PROTECTED] 
Enviado el: Miércoles, 05 de Mayo de 2004 11:56 a.m.
Para: Struts Users Mailing List
Asunto: RE: is this posible? return to the same page after being
executed

Yes, this will work: try it! :)

Geeta

> -Original Message-
> From: Julio Cesar De Salvo [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 05, 2004 11:06 AM
> To: 'Struts Users Mailing List'
> Subject: is this posible? return to the same page after being executed
> 
> 
> Is there some way to return to the page / action that called to action
> that is being executed?
> I've 1 jsp that forwards to an action and I would like to 
> return to the
> same page that called the action, by setting the path in the
> ActionForward object.
>  
> Thanks.
> 

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



Re: is this posible? return to the same page after being executed

2004-05-05 Thread Riyad Kalla
Julio,
This isn't a problem at all. I do this now with a page that builds 
itself out top-to-bottom as the user makes more selections and 'submits' 
them, then the page reloads with another section showing asking for more 
user input. I guess its kinda like a 1-page wizard.

Julio Cesar De Salvo wrote:

Is there some way to return to the page / action that called to action
that is being executed?
I've 1 jsp that forwards to an action and I would like to return to the
same page that called the action, by setting the path in the
ActionForward object.
Thanks.

 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: is this posible? return to the same page after being executed

2004-05-05 Thread Martin Gainty
forward takes the current request and response objects and sends them to
another resource which then handles the request as it sees fit.
Redirect sends a response back to the client that causes the clients browser
to send a new request to the new provided URL.

response courtesy of JavaRanch article
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=18&t=
000315

Verdad?
-Martin

- Original Message -
From: "Julio Cesar De Salvo" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Wednesday, May 05, 2004 11:05 AM
Subject: is this posible? return to the same page after being executed


> Is there some way to return to the page / action that called to action
> that is being executed?
> I've 1 jsp that forwards to an action and I would like to return to the
> same page that called the action, by setting the path in the
> ActionForward object.
>
> Thanks.
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: is this posible? return to the same page after being executed

2004-05-05 Thread Geeta Ramani
Yes, this will work: try it! :)

Geeta

> -Original Message-
> From: Julio Cesar De Salvo [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 05, 2004 11:06 AM
> To: 'Struts Users Mailing List'
> Subject: is this posible? return to the same page after being executed
> 
> 
> Is there some way to return to the page / action that called to action
> that is being executed?
> I've 1 jsp that forwards to an action and I would like to 
> return to the
> same page that called the action, by setting the path in the
> ActionForward object.
>  
> Thanks.
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]