chkal / mvc-spec-migration-test

0 stars 0 forks source link

Explore ways to avoid hardcoding URIs in templates #58

Open chkal opened 9 years ago

chkal commented 9 years ago

Original issue MVC_SPEC-55 created by stefantilkov:

In templates, links (most importantly a elements) and form actions require a URI. If this URI is provided as a string, even if prefixed by a getBaseUri() (or similar) call, this will be redundant to the declarative mapping to URIs on controller methods. JAX-RS provides the UrIBuilder API to address this from within resources, but there should at least be a convenient way to access this from templates, possibly from the MvcContext object.

chkal commented 9 years ago

Comment by tommy94:

Hi, I am Yusuf. We use mvc.contextPath or mvc.applicationPath generally. If we use different way, this case causes problem. But we can use together.