RE: Logon redirect - Construct ActionForward on the fly ?

2005-08-04 Thread aleiprecht

Please disregard ...
The solution was right in front of my eyes ;)

At the end of the logon action

if (getSessionAttribute("AFTERLOGON_DEST") != null) {
String tmpString = "" + getSessionAttribute ("AFTERLOGON_DEST");
  removeSessionAttribute("AFTERLOGON_DEST");
  return  (ActionForward) new RedirectingActionForward(tmpString); 
} else {
return (mapping.findForward("logonsuccess"));
}

The calls

getSessionAttribute(String key)
removeSessionAttribute(String key)

are just shortened for readability sake

rgds
albi

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 04, 2005 3:01 PM
To: user@struts.apache.org
Subject: Logon redirect - Construct ActionForward on the fly ?

Hi all,

I have overridden the RequestsProcessor#processRoles() to check whether a
user has sufficient Role to access an Action(an therefore a page). If he/she
hasn't, it is easy. I dump the request URI to the session and redirect to a
global forward (logon). That's all not so difficult..as the logon is a
statically existing mapping..

The logon has a forward linking to the member's homepage and after the users
logged in successfully, that's where they get forwarded to..

I would like to forward them to the stored URI (from the session), if they
tried to access a specific location in the members area rather then logging
in proactively. Any hints where to look to get enlightened?

Rgds
Aleiprecht

PS: To all native English speakers . sorry . I'm German .all language
mistakes exclusively C by myself ;)


-
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: Logon redirect - Construct ActionForward on the fly ?

2005-08-04 Thread Gareth Evans

In your login jsp


" />


In your login action...

String redirect = form.get("url");  // providing your using a dyna type action 
form
if ( redirect != null ) {
return new RedirectingActionForward( redirect );
}
return mapping.findForward("success");


Something like that should work

[EMAIL PROTECTED] wrote:


Hi all,

I have overridden the RequestsProcessor#processRoles() to check whether a
user has sufficient Role to access an Action(an therefore a page). If he/she
hasn't, it is easy. I dump the request URI to the session and redirect to a
global forward (logon). That's all not so difficult..as the logon is a
statically existing mapping..

The logon has a forward linking to the member's homepage and after the users
logged in successfully, that's where they get forwarded to..

I would like to forward them to the stored URI (from the session), if they
tried to access a specific location in the members area rather then logging
in proactively. Any hints where to look to get enlightened?

Rgds
Aleiprecht

PS: To all native English speakers . sorry . I'm German .all language
mistakes exclusively C by myself ;)


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



--
Gareth Evans

MSoft eSolutions Limited
Technology Centre
Inward Way
Rossmore Business Park
Ellesmere Port
Cheshire
CH65 3EN

--
Tel:+44 (0)870 0100 704
Fax:+44 (0)870 9010 705
E-Mail: [EMAIL PROTECTED]
Web:www.msoft.co.uk

--
Terms:
Please note that any prices quoted within this e-mail are subject to VAT.
All program details and code described in this e-mail are subject to
copyright © of MSoft eSolutions Limited and remain the intellectual
property of MSoft eSolutions Limited.
Any proposal or pricing information contained within this e-mail are
subject to MSoft eSolutions' Terms and Conditions
--
Disclaimer:
This message is intended only for use of the addressee. If this message
was sent to you in error, please notify the sender and delete this
message. MSoft eSolutions Limited cannot accept responsibility for viruses,
so please scan attachments. Views expressed in this message do not
necessarily reflect those of MSoft eSolutions Limited who will not
necessarily be bound by its contents.


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