You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Shabada, Gnaneshwer" <sh...@toysrus.com> on 2004/09/29 17:59:41 UTC

RE: Detecting the previous JSP

Frank,
Thanks for your input. Thought I'd forward this back to the mailing list so
that others can view..

Coming back to my problem. I would call the same action from two screens
because, they both are delete functionality. It's just I need to determine
in my deleteAction class if its a multiple delete or a single delete based
on where I am coming from. Any ideas?

Thanks

-----Original Message-----
From: Frank W. Zammetti (MLists) [mailto:fzlists@omnytex.com]
Sent: Wednesday, September 29, 2004 11:25 AM
To: shabadag@toysrus.com
Subject: Re: Detecting the previous JSP


I seem to be having trouble posting to the mailing list, so I thought I'd
send this directly to you...


I'm not sure you can tell what JSP you came from without passing some
hidden variable, but what you CAN do, wich might be just as good, is
determine what mapping was executed...

In your Action's execute() method, use:

String path = mapping.getPath();

This will be something like "/deleteUser" if your Action Mapping was
"/deleteUser.do" for instance.  Assuming you aren't calling the same
mapping from both places, this might give you what you need.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Wed, September 29, 2004 11:02 am, Shabada, Gnaneshwer said:
>
> Hi.
>
> Is there any way in Struts I could determine dynamically what
> JSP/screen/action am coming from when I am in a certain screen. I have a
> scenario where I can delete users from a result list page or a member
> details page. I want to use one action to do both. But to code my action
> easier I want to determine what page I am invoking the delete action. Is
> there anything inbuilt in Struts to determine that?
>
> Thanks
> Gnan
>
> ========================================================================
> This email message is for the sole use of the intended recipient (s) and
> may
> contain confidential and privileged information. Any unauthorized review,
> use, disclosure or distribution is prohibited. If you are not the intended
> recipient, please contact the sender by reply email and destroy all copies
> of the original message. To reply to our email administrator directly,
> send
> an email to EmailAdmin@toysrus.com.
> Toys "R" Us, Inc.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

======================================================================== 
This email message is for the sole use of the intended recipient (s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message. To reply to our email administrator directly, send
an email to EmailAdmin@toysrus.com. 
Toys "R" Us, Inc.

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


Re: R: Detecting the previous JSP

Posted by Jorge <ca...@gmail.com>.
I think that information should be passed to the action via form
properties (using html:hidden input tag on your pages)


On Wed, 29 Sep 2004 18:05:57 +0200, Amleto Di Salle
<di...@di.univaq.it> wrote:
> Hi,
> As i wrote before may be the solution is to use DispatchAction.
> 
> BR
> /Amleto
> 
> 
> -----Messaggio originale-----
> Da: Shabada, Gnaneshwer [mailto:shabadag@toysrus.com] 
> Inviato: mercoledì 29 settembre 2004 18.00
> A: 'user@struts.apache.org'
> Oggetto: RE: Detecting the previous JSP
> 
> Frank,
> Thanks for your input. Thought I'd forward this back to the mailing list
> so that others can view..
> 
> Coming back to my problem. I would call the same action from two screens
> because, they both are delete functionality. It's just I need to
> determine in my deleteAction class if its a multiple delete or a single
> delete based on where I am coming from. Any ideas?
> 
> Thanks
> 
> -----Original Message-----
> From: Frank W. Zammetti (MLists) [mailto:fzlists@omnytex.com]
> Sent: Wednesday, September 29, 2004 11:25 AM
> To: shabadag@toysrus.com
> Subject: Re: Detecting the previous JSP
> 
> I seem to be having trouble posting to the mailing list, so I thought
> I'd send this directly to you...
> 
> I'm not sure you can tell what JSP you came from without passing some
> hidden variable, but what you CAN do, wich might be just as good, is
> determine what mapping was executed...
> 
> In your Action's execute() method, use:
> 
> String path = mapping.getPath();
> 
> This will be something like "/deleteUser" if your Action Mapping was
> "/deleteUser.do" for instance.  Assuming you aren't calling the same
> mapping from both places, this might give you what you need.
> 
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> On Wed, September 29, 2004 11:02 am, Shabada, Gnaneshwer said:
> >
> > Hi.
> >
> > Is there any way in Struts I could determine dynamically what
> > JSP/screen/action am coming from when I am in a certain screen. I have
> 
> > a scenario where I can delete users from a result list page or a
> > member details page. I want to use one action to do both. But to code
> > my action easier I want to determine what page I am invoking the
> > delete action. Is there anything inbuilt in Struts to determine that?
> >
> > Thanks
> > Gnan
> >
> > ======================================================================
> > ==
> > This email message is for the sole use of the intended recipient (s)
> and
> > may
> > contain confidential and privileged information. Any unauthorized
> review,
> > use, disclosure or distribution is prohibited. If you are not the
> intended
> > recipient, please contact the sender by reply email and destroy all
> copies
> > of the original message. To reply to our email administrator directly,
> > send
> > an email to EmailAdmin@toysrus.com.
> > Toys "R" Us, Inc.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> 
> 
> 
> ========================================================================
> 
> This email message is for the sole use of the intended recipient (s) and
> may contain confidential and privileged information. Any unauthorized
> review, use, disclosure or distribution is prohibited. If you are not
> the intended recipient, please contact the sender by reply email and
> destroy all copies of the original message. To reply to our email
> administrator directly, send an email to EmailAdmin@toysrus.com.
> Toys "R" Us, Inc.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

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


R: Detecting the previous JSP

Posted by Amleto Di Salle <di...@di.univaq.it>.
Hi,
As i wrote before may be the solution is to use DispatchAction.

BR
/Amleto


-----Messaggio originale-----
Da: Shabada, Gnaneshwer [mailto:shabadag@toysrus.com] 
Inviato: mercoledì 29 settembre 2004 18.00
A: 'user@struts.apache.org'
Oggetto: RE: Detecting the previous JSP



Frank,
Thanks for your input. Thought I'd forward this back to the mailing list
so that others can view..

Coming back to my problem. I would call the same action from two screens
because, they both are delete functionality. It's just I need to
determine in my deleteAction class if its a multiple delete or a single
delete based on where I am coming from. Any ideas?

Thanks

-----Original Message-----
From: Frank W. Zammetti (MLists) [mailto:fzlists@omnytex.com]
Sent: Wednesday, September 29, 2004 11:25 AM
To: shabadag@toysrus.com
Subject: Re: Detecting the previous JSP


I seem to be having trouble posting to the mailing list, so I thought
I'd send this directly to you...


I'm not sure you can tell what JSP you came from without passing some
hidden variable, but what you CAN do, wich might be just as good, is
determine what mapping was executed...

In your Action's execute() method, use:

String path = mapping.getPath();

This will be something like "/deleteUser" if your Action Mapping was
"/deleteUser.do" for instance.  Assuming you aren't calling the same
mapping from both places, this might give you what you need.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Wed, September 29, 2004 11:02 am, Shabada, Gnaneshwer said:
>
> Hi.
>
> Is there any way in Struts I could determine dynamically what 
> JSP/screen/action am coming from when I am in a certain screen. I have

> a scenario where I can delete users from a result list page or a 
> member details page. I want to use one action to do both. But to code 
> my action easier I want to determine what page I am invoking the 
> delete action. Is there anything inbuilt in Struts to determine that?
>
> Thanks
> Gnan
>
> ======================================================================
> ==
> This email message is for the sole use of the intended recipient (s)
and
> may
> contain confidential and privileged information. Any unauthorized
review,
> use, disclosure or distribution is prohibited. If you are not the
intended
> recipient, please contact the sender by reply email and destroy all
copies
> of the original message. To reply to our email administrator directly,
> send
> an email to EmailAdmin@toysrus.com.
> Toys "R" Us, Inc.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

========================================================================

This email message is for the sole use of the intended recipient (s) and
may contain confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not
the intended recipient, please contact the sender by reply email and
destroy all copies of the original message. To reply to our email
administrator directly, send an email to EmailAdmin@toysrus.com. 
Toys "R" Us, Inc.

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


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