In my spring application I have the following directory structure:
root
|
|---commons
| |
| |---index.jsp
| .....
|
|---admin
|
|---user-control-admin.jsp
....
Of course, I can specify a path explictly, for example
@RequestMapping(value="/admin/user-control-admin")
and do it for all pages, applying the following viewResolver
configureation:
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView" />
<property name="prefix" value="/WEB-INF/root/" />
<property name="suffix" value=".jsp" />
</bean>
Is there a way to avoid specifying the piece of path like /admin
or /commons
? I'm sure names are not going to be in conflict.
Aucun commentaire:
Enregistrer un commentaire