问题:页面转移是显示资源不存在,配置都没问题啊,因为之前是可以的,后来我加了点功能,集成了log4J,和easyui框架,再集成easyui框架的时候,完成一个登录功能,跳转到管理后台,就出现这个问题,求大神解救!!!!后台输出:
2013-08-20 17:09:08 [org.springframework.web.servlet.DispatcherServlet-823]-[DEBUG] DispatcherServlet with name 'springmvc' processing POST request for [/system/login]
 2013-08-20 17:09:08 [org.springframework.web.servlet.PageNotFound-1108]-[WARN] No mapping found for HTTP request with URI [/system/login] in DispatcherServlet with name 'springmvc'
 2013-08-20 17:09:08 [org.springframework.web.servlet.DispatcherServlet-966]-[DEBUG] Successfully completed request
登录页面代码:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
  </head>
  
  <body>
    <form action="/system/login" method="post" >
     <table>
     账号:<input type="text" value="" id="userName" name="userName" />
     <br/>
     密码:<input type="password" value="" id="password" name="password" />
     <br/>
     <input type="submit" value="登录">
     </table>
    </form>
  </body>
</html>
登录后的action:
@Controller
@RequestMapping("/system")
public class LoginAction {
private Logger log = Logger.getLogger(LoginAction.class);
@Resource
UserService userService;
@Resource
SysUserService sysUserService;
@RequestMapping(value="/login")
public String login(Model model,
@RequestParam(value="userName") String userName,
@RequestParam(value="password") String password) throws Exception{
SysUserBean bean = sysUserService.getBeanByLoginInfo(userName, password);
if(null == bean){
model.addAttribute("msg", "用户名或密码错误!");
return "/login";
} else {
return "/admin/main";
}
}
}配置如下:
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" 
xmlns="http://java.sun.com/xml/ns/javaee" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
  <display-name>Ycol</display-name>
  <!-- 项目根目录名 -->
<context-param>  
        <param-name>webAppRootKey</param-name>  
        <param-value>ycol.root</param-value>  
    </context-param> 
  <welcome-file-list>
    <welcome-file>/jsp/login.jsp</welcome-file>
  </welcome-file-list>
  
  <!--Spring ApplicationContext 配置文件 载入 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:/resources/spring/applicationContext*.xml</param-value>
</context-param>

  <!--Spring ApplicationContext 载入 -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<!--Spring MVC 载入 -->
<servlet>
<servlet-name>springmvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:/resources/spring/springmvc-servlet.xml</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springmvc</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>

<!-- Kindeditor图片上传 -->
<servlet>
    <servlet-name>KindeditorServlet</servlet-name>
    <servlet-class>common.kindeditor.KindeditorServlet</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>KindeditorServlet</servlet-name>
<url-pattern>/KindeditorServlet</url-pattern>
</servlet-mapping>

<!-- log4j 配置文件 载入  -->
<context-param>  
    <param-name>log4jConfigLocation</param-name>  
    <param-value>WEB-INF/classes/resources/log4j/log4j.xml</param-value>  
</context-param>
<!-- log4j 刷新间隔 -->
<context-param>  
        <param-name>log4jRefreshInterval</param-name>  
        <param-value>3000</param-value>  
    </context-param>
<!-- spring log4j 载入  -->
<listener>
    <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>  
</listener>  

</web-app>
springmvc-servlet.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:p="http://www.springframework.org/schema/p" xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd   
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd   
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<!-- 解决@ResponseBody的ajax请求出现中文乱码的问题  -->
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">   
        <property name="messageConverters">   
            <list>   
                <bean class="org.springframework.http.converter.StringHttpMessageConverter">   
                    <property name="supportedMediaTypes">   
                        <list>   
                            <value>text/html;charset=UTF-8</value>   
                        </list>   
                    </property>   
                </bean>   
            </list>   
        </property>   
    </bean>   
<!-- 页面的前缀和后缀 -->
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
    <!-- 扫描含有注解的java类,并注入到spring -->
<context:component-scan base-package="action" />
<!-- 设置静态资源,不会被springMVC所拦截 -->
    <mvc:resources location="/static/" mapping="/static/**"/>
    <mvc:resources location="/jsp/" mapping="/jsp/**"/> 
</beans>