1. redirect
<mvc:view-controller path= "/" view-name= "Redirect:/admin/index"/>
That is, if the current path is/then redirect to/admin/index
2. View Name
<mvc:view-controller path= "/" View-name=admin/index "/>
<bean id= "Defaultviewresolver" class= "Org.springframework.web.servlet.view.InternalResourceViewResolver" P:o Rder= "2" > <property name= "viewclass" value= "Org.springframework.web.servlet.view.JstlView"/> < Property Name= "ContentType" value= "text/html"/> <property name= "prefix" value= "/web-inf/jsp/"/> & Lt;property name= "suffix" value= ". jsp"/> </bean>
The resulting view when the/web-inf/jsp/admin/index.jsp
do not want to enter controller, you can configure the static access path in Spring-mvc.xml
Xml Code
<!--access to static resource files --
<mvc:resources mapping= "/images/**" location= "/images/" cache-period= "31556926"/>
As such, JSP files can be accessed directly without a controller, if placed under the static path/images.
Mvc:view-controller