Indexed url encoding for shared resources with optional query parameters
for example, with this url
/mountpath/foo/bar/baz?name=joe&languages=java&languages=scala
the parameters value map will be
Key |
Value |
"0"
| "foo" |
"1"
| "bar" |
"2"
| "baz" |
"name"
| "joe" |
"languages"
| String[] { "java", "scala" } |
so you can have urls like these
/images/{imagename}.{format} /blog/2008/05/12/47-test-blog-entry.html
with
absolutely no effort.
Can be used in WebApplication like this:
mount(new IndexedSharedResourceCodingStrategy(path, sharedResourceKey);
The greatest benefit is that shared resource urls look like static resources for the browser.
This comes especially handy when utilizing browser caching. Also, the user will not realize the
resources are served dynamically and bookmarking is easy.