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

2004-05-05 Thread Julio Cesar De Salvo
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.


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]



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

  action
path=/myAction
type=com.desalvo.action.MyAction
scope=request
name=myActionForm
input=/pages/myActionForm.jsp
forward name=Success path=/myAction.do /
  /action
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]