struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jae K" <invr...@gmail.com>
Subject Re: resume after login feature
Date Sun, 08 Apr 2007 19:26:36 GMT
Sigh... I tried tackling the first half of this problem today. The first
part is getting the original requested URL as a parameter to the
RedirectActionResult.

        </global-results>
            <result name="login" type="redirect-action">
                <param name="actionName">Login</param>
                <param name="namespace">/</param>
                <param name="origurl">${ServletRequest.requestURI}</param>
<-- not sure about the OGNL here.
            </result>
        </global-results>

All of my actions extend MySupport, which implement ServletRequestAware. I
fired my debugger to see whether the request object would even be set (with
the setServletRequest method) in my action before the redirect-action is
executed. NO! I don't think I can access the ServletRequest object from the
redirect-action configuration!

My only remaining option is to create my own redirect class that taps into
the ServletRequest object via the invocation object. Rigth now S2 is looking
very very unattractive as a web framework, because the OGNL features are not
well documented (esp in relation to struts results), and because the given
Result and Interceptor classes are not suitable for my basic needs such as
resume after redirect.

 - Jae

On 4/6/07, Dave Newton <newton.dave@yahoo.com> wrote:
>
> --- meeboo <deepstar@gmail.com> wrote:
> > One last question regarding this. As I beforehand
> > don't know where to redirect the user after the
> login
> > action I will have to implement the
> > ServletResponseAware interface and then use the
> > HttpServletResponse for this. This seems like an
> ugly
> > way to redirect the user, are there other ways
> maybe?
>
> As someone else mentioned if you are using an
> interface to set the original URL (like void
> setOriginalUrl(String) & String getOriginalUrl()) then
> you can map a redirect in your action's config, more
> or less like the following:
>
> <result type="redirect">${originalUrl}</result>
>
> That was a day or two ago; I don't have a reference to
> it handy and I don't recall who the poster was.
>
> d.
>
>
>
>
>
> ____________________________________________________________________________________
> It's here! Your new message!
> Get new email alerts with the free Yahoo! Toolbar.
> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message