struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
Subject Re: resume after login feature
Date Thu, 05 Apr 2007 15:32:52 GMT
--- meeboo <deepstar@gmail.com> wrote:
> Gotcha Dave... now all I need is clean URL:s before
> I can actually consider using this damned framework 

Clean URLs?

FYI, the source for
org.apache.struts2.interceptor.ServletConfigInterceptor
shows how to access the request, from which you can
grab the original URL to pass to your login action.
Briefly:

if (action instanceof ServletRequestAware) {
    HttpServletRequest request = 
        (HttpServletRequest)
context.get(HTTP_REQUEST);
    ((ServletRequestAware)
action).setServletRequest(request);
}

...but obviously you'd want to build up the URL and
use something like (pseudo-config):

<action name="login" type="...">
  <result type="redirect">${originalUrl}</result>
</action>

d.



 
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/

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


Mime
View raw message