tags:

views:

40

answers:

2

I am currently working on a project that requires the use of a semi-colon in our restful-url scheme.

As you can imagine, we're having issues pulling this off - the underlying Java HTTPServletRequest isn't playing nicely.

Is there a way to work around this issue?

example restulf-URL:

http://service/BOB;MIKE/

Looks like Spring is only working on /service/bob - the ;MIKE gets truncated.

We've tried %3B (or %3F something like that) and it doesn't work.

Thanks in advance!

ct

A: 

this is the list of all the delimiters you can legally use in a URI:

! $ & ( ) * , ; = + ' : @ / ?

try each and see which works for you.

apparently Spring robs you of the ;. I'm not sure if that's a Servlet thing, but in any case, it sucks. A web framework should allow developers to construct ANY legal URIs.

irreputable
turns out it's a servlet thing. there seems to be an error in the Java Servlet API.
ct
A: 

Are you using spring's built-in REST support via @RequestMapping and @PathVariable? How are you resolving the "BOB" part that you are currently getting?

we're using the default; we've been playing with a HTTPRequest filter and it seems to be working. Just really annoying that this doesn't work like it should (processing the items as a list of arguments that is).
ct