Ben, I agree its not what anyone expects.
I guess it means that I will have to use single character (valid) dummy values as a work-around e.g.: /web/article/0/0/_/add Not ideal but as you point out the web container is the collapsing the back-to-back slashes. --Nikolaos Ben Gunter wrote: > That certainly isn't what I would expect to happen, but it does not > appear to be the fault of Stripes. I set up an ActionBean like you > describe in a test app and got the same results you did. When I hooked > up a debugger to look at UrlBindingFactory.getBinding(..), I stepped > into HttpUtil.getRequestedPath(..) and found that the value returned > by request.getServletPath() is not "/web/article////add" but > "/web/article/add". It seems the servlet container does us a "favor" > by collapsing multiple slashes in the path to a single one. > > One might be inclined to use request.getRequestURI() instead, but that > causes even bigger problems. See here for a little bit of history: > http://www.stripesframework.org/jira/browse/STS-575 > > I'm not sure there's much we can do about this. > > -Ben > > On Sat, Nov 20, 2010 at 6:17 PM, Nikolaos Giannopoulos > <nikol...@brightminds.org <mailto:nikol...@brightminds.org>> wrote: > > Hi, > > If I have the following Url binding were each of the 1st 3 fields are not > required: > @UrlBinding("//article//{authorId}/{id}/{titleUrlified}/{$event}") > > And try the following Url: > /web/article///add > > Clearly the "add" handler gets triggered but then something bizarre > happens. > > The values that are assigned are: > authorId = 'add' > id = null > titleUrlified = null > > However I expected the following assignment: > authorId = null > id = null > titleUrlified = null > > It appears that although Stripes is able to correctly bind the > appropriate fields of the @UrlBinding for the incoming request it doesn't > fulfill that when assigning the values to the attributes of the ActionBean... > > It's as if it says well what do we need to assign 1st? > Umm.... authorId... ok what's the 1st value we have... 'add'... great... > NO... 'add' is bound to the "event"!!! > > It should be we just did this: > 1. authorId was not required and had no value hence its assigned null > 2. id was not required and had no value hence its assigned null > 3. titleUrlified was not required and had no value hence its assigned null > 4. and event is assigned 'add' > > Is this not a bug? > > --Nikolaos > > > > > ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users