Peter,
That worked great!
For mine, I added a test for even number of segments like so:
List<String> segs = request.getUrl().getSegments();
if (segs.size()%2==1)
segs.add("0"); // maybe throw exception instead?
String[] named = segs.toArray(new String[segs.size()]);
Thanks again,
-- Jim.
2010/12/22 Major Péter <[email protected]>
> Hi,
>
> I've played with the encoders, and currently this is what I'm using:
> https://gist.github.com/717942
> It isn't really tested out, but did the job for a quick look :)
>
> Hope this helps
>
> Regards,
> Peter
>
> 2010-12-22 18:23 keltezéssel, Jim Pinkham írta:
>
> In my 1.5-M3 app's init, I've got:
>>
>> // this part works fine, just wanted to show where the xxxx comes
>> from below...
>> getRootRequestMapperAsCompound().add(customHomeMapper);
>>
>> getRootRequestMapperAsCompound().add(
>> new MountedMapper("/statement", StatementPage.class));
>>
>> and my StatementPage URLs look like this:
>>
>> http://localhost:8080/xxxx/statement?id=3&p2=75
>>
>> I need them to look like this:
>>
>> http://localhost:8080/xxxx/statement/id/3/p2/75
>>
>> Looks like HybridURLCodingStrategy is out and PageParametersEncoder is
>> it's
>> replacement... but no subclasses that do what I need.
>>
>> Is there a 1.5 equivalent before I go write one, or is there another way?
>>
>> BTW, the ability to have the custom home component mapper is the reason
>> I'm
>> migrating - I'm so happy to have that feature!!
>> I just need a bit of help getting this into final form.
>>
>> Thanks,
>> -- Jim.
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>