chkal / mvc-spec-migration-test

0 stars 0 forks source link

View Resources #30

Closed chkal closed 8 years ago

chkal commented 9 years ago

Original issue MVC_SPEC-33 created by Santiago Pericas-Geertsen:

Relative paths in views (e.g. to a CSS file) are resolved with respect to the originating request. This does not work in general, as two controllers with different URIs may refer to the same view.

There should be a new section in the spec about this.

chkal commented 8 years ago

Comment by Santiago Pericas-Geertsen:

I think what we need is for views to have access to contextual information such as context and application path. There are ways to do this with JSPs, but a portable alternative from MVC may be better. For example,

<link rel="stylesheet" type="text/css" href=“${mvc.contextPath}/ozark.css"/>

The 'mvc' object may be useful to access message bundles as well, for example.