Spring 3.0 MVC mvc:view-controller tag
Posted
by gouki
on Stack Overflow
See other posts from Stack Overflow
or by gouki
Published on 2010-06-17T07:17:03Z
Indexed on
2010/06/17
8:43 UTC
Read the original article
Hit count: 224
spring-mvc
|spring-framework
Here's a snippet of my mvc-config.xml
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/views/"/>
<property name="suffix" value=".jsp"/>
</bean>
<mvc:view-controller path="/index" view-name="welcome"/>
<mvc:view-controller path="/static/login" view-name="/static/login"/>
<mvc:view-controller path="/login" view-name="/static/login"/>
I have the welcome.jsp on /WEB-INF/view/ directory and login.jsp on /WEB-INF/view/static/.
This work for '/index' and '/login' paths. But I'm getting 404 response for '/static/login' when invoked from the browser. I'm expecting that '/static/login/' and '/login' should behave the same.
What could be wrong here?
Would appreciate any help.
Thanks!
© Stack Overflow or respective owner