首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

spring mvc登陆页跳转到首页是个空白页面解决方法

2014-06-08 
spring mvc登陆页跳转到首页是个空白页面

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") 所以有。

热点排行