This turns out to be a bug in Glassfish.
Stripes uses HttpServletRequest.getServletPath() method instead of 
getRequestURI and it seems getServletPath is broken in Glassfish such 
that it doesn't decode + to space.
Although there is is a reason given in the comment in Stripes' 
HttpUtil.getRequestedPath method for using getServletPath, I don't see 
why we can't use getRequestURI instead (and append getPathInfo there if 
neccessary). I patched my copy of Stripes to use getRequestURI instead 
of getRequestedPath and everything seems to work.

Could someone clever (Ben, author of the class I'm talking about, 
maybe?) explain me if there's some risk in doing as I did?

Best regards,
Grzegorz


Grzegorz Krugły pisze:
> Hi,
>
> I have this example URL 
> http://localhost:8080/product/find/Europe+%2B+Poland/1
>
> and the binding is @UrlBinding("/product/find/{what}/{pageNo=1}")
>
> The problem is, that "Europe+%2B+Poland" is a proper URL encoding for 
> "Europe + Poland" string, but when I use my action's getWhat() method, I 
> get "Europe+++Poland" which is obviously not properly decoded (+ in the 
> URL means "space").
>
> Is this a bug or a feature? ;-)
>   


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to