Reputation: 2535
I have a question about URI template variables.
I need to manage an URI with the form:
http://netlocation:port/application_path/{variable}
the variable can be a path itself, i.e. something like
this/variable/is/a/path
so that the complete URI appears to be
http://netlocation:port/application_path/this/variable/is/a/path
how can I manage that?
Upvotes: 2
Views: 9451
Reputation: 571
Use the "+" operator in order to avoid escaping the "/" character:
http://netlocation:port/application_path/{+foo}
You can try on URI Template Parser Online
Upvotes: 3
Reputation: 4327
Have you looked at http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/web/util/UriTemplate.html ?
Upvotes: 1
Reputation: 9791
You could use query parameters and just encode the path variable in the standard way:
http://netlocation:port/application_path?path=%2Fthis%2Fvariable%2Fisapath
Upvotes: 2