日期:2014-05-17  浏览次数:20890 次

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;  
         }  

------解决方案--------------------
鼠标右击属性,看下url地址是什么。
------解决方案--------------------
感觉是配置的问题。
------解决方案--------------------
extjs mvc 是吧。 
------解决方案--------------------
你这个  相当于acton 路径  http://localhost:8888/EarthQuakeConfig/login/app/controller/MainController.js?_dc=1389239590524"

你配置 了。@Controller
@RequestMapping("/login") 所以有。