spring mvc登陆页跳转到首页是个空白页面
<mvc:resources mapping="/images/**" location="/images/"/>
<mvc:resources mapping="/extjs-4.1.1/**" location="/extjs-4.1.1/"/>
<mvc:resources mapping="/js/**" location="/js/"/>
<mvc:resources mapping="/css/**" location="/css/"/>
<mvc:resources mapping="/app/**" location="/app/"/>
<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/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
@RequestMapping(value="/checkLogin", method=RequestMethod.POST)
public String checkLogin(String userName, String password)
{
return "main";
}
[解决办法]
返回
return "main.jsp";
看下可以不
或者如下方法:
@RequestMapping(value="/index.html")
public ModelAndView index(){
ModelAndView mav = new ModelAndView("index","msg","SpringMvc, Hello World!");
return mav;
}