Annotation based view mapping
Posted
by Eqbal
on Stack Overflow
See other posts from Stack Overflow
or by Eqbal
Published on 2010-04-29T17:39:37Z
Indexed on
2010/05/01
19:27 UTC
Read the original article
Hit count: 264
spring-mvc
|spring-annotations
I am trying to get my head around annotation based mappings and I am having some trouble mapping requests directly to jsp.
Do all request have to go through a controller? Is it possible to make it just go to a jsp without declaring a RequestMapping
for GET
?
I am using a InternalResourceViewResolver
. Below is my app-servlet.xml
<context:annotation-config/>
<context:component-scan base-package="com.pioneer.b2broe.web" />
<mvc:annotation-driven />
<mvc:view-controller path="/" view-name="home"/>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:prefix="/WEB-INF/jsp/"
p:viewClass="org.springframework.web.servlet.view.JstlView" p:suffix=".jsp" p:order="2"/>
© Stack Overflow or respective owner