otismo schrieb:
> Why does my request url get truncated?  And what is the correct way to
> redirect/forward a user to their originally requested url after a login?
> 
> I'm trying to set up a security interceptor that will authenticate a user
> that hasn't yet been authenticated.  I'm mirroring the interceptor setup in
> the stripes "intercept execution" how to.  If a user hasn't logged in, he
> gets forwarded to the login action bean.  I pass along the original target
> url, so the login action bean can forward the user to the right page after
> login.  My problem is that the target url gets truncated so that I can't use
> it to forward a user after login.
> 
> Say my request url is: /subpath1/subpath2, the request url returned from
> actionBeanContext().getRequest().getServletPath() is /subpath1.  The path
> gets truncated even whether or not the interceptor is invoked.  The url
> binding for my action bean is: 
> @UrlBinding("/subpath1/subpath2/{$event}")
> 
> The url also gets truncated to /subpath1 if the original request is
> /subpath1/subpath2/view.
> 
> This must be a standard procedure, but I couldn't locate a how to or any
> posts on it.  Is it too basic? :)
> 
> Thanks for any tips,
> Peter
I build the path as follows

HttpServletRequest request = ontext.getActionBeanContext().getRequest();
                        String path = null;
                        if (request.getQueryString() == null)
                                path = request.getRequestURI();
                        else
                                path = new 
StringBuilder(request.getRequestURI()).append('?').append(request.getQueryString()).toString();


-- 

Best Regards / Viele Gruesse

Sebastian Hennebrueder
---
Training for Java Persistence and Hibernate - http://www.laliluna.de

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to