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:
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
While @Amos M. Carpenter answer is correct, here is the required configuration to turn this behavior off :
Seems this is intentional on Spring's part, but at least it's configurable.
You need to tell your handler mapping to
setRemoveSemicolonContent(false)
(default istrue
). See the Javadoc for more details.The reason why this was done is because they apparently wanted to remove the
;jsessionid=...
suffix from URIs.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.