Is it possible to: set a URI template in the mvc:view-controller element of the *-servlet.xml file or in a controller method and then use/get that path parameter in a js
The Map of resolved path variables is exposed as an attirubte with name specifed by HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE. So, the solution is
But accessing it this way is probably not a best idea, Affe's solution is cleaner.