
Originally Posted by
lilolme
I just can't figure out how to resolve the application context with Request mapping.
The application (app.war) that runs in the context /app
I don't want to hardcode the context in the controller urls so that I can run the app under different contexts e.g. in root context.
Until now I was using relative urls like so
page url : /app/module/123
form action : doSomething/abc
controller method: @RequestMapping("module/doSomething/{abc}")
I want to include this jsp form on different modules but this means it must work in different paths and relative urls will be impossible to manage. How can I specify the application context to controller method .. something equivalent to this without hardcoding it.
controller method: @RequestMapping("{app}/module/doSomething/{abc}")