According to the Jersey documentation, curly brace is used as the path
parameter id delimiter, precisely because it is prohibited by the HTTP
specification.
Which doesn't help, sorry, and isn't to say there might not be some hack
that could be done to get round it, but does suggest that you might want to
see if there's not some way you can change the specification of your query
param.
If I were desperate, I'd see if I can catch it with a ServletFilter, change
it to square brackets instead, or something like it, and then let Jersey
deal with the result. I have no idea if that would actually work though,
and it might well end up being container dependent.
> Subject: [Jersey] Problem with curly braces in request parameter value
> Hello,
> I have inhereted old restful services which I need to migrate to Jersey.
> One of the calls looks like this:
> /myService?myParam={something,other}
> I'm getting exception:
>
> Illegal character "," at position 27 is not allowed as a part of a name in a path template "myParam={something,other}"
>
> All I need to do, is just get value of the parameter. But I cannot change the format of the value. It mast by like this myParam={something,other}
>
> If I remove curly braces everything works.
>
> How can I fix this problem?
>
> Thank you,
>
> Eugene
>
>
>
> End of digest for list users_at_jersey.java.net - Sat, 31 May 2014
>
>
--
Simon Roberts
Certified Professional Photographer
http://dancingcloudphotography.com
(303) 249 3613