1. 程式人生 > >java.lang.ClassNotFoundException web專案載入時找不到類

java.lang.ClassNotFoundException web專案載入時找不到類

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <welcome-file-list>
    <welcome-file>login.jsp</welcome-file>
  </welcome-file-list>
  <display-name>springMVC</display-name>
  <servlet>
    <servlet-name>spring</servlet-name>
    <servlet-class>
			org.springframework.web.servlet.DispatcherServlet
		</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>spring</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>
  <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>
  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:config/spring/applicationContext.xml</param-value>
  </context-param>
  
  <!-- log4j配置 -->
 <context-param>  
    <param-name>log4jConfigLocation</param-name>  
    <param-value>classpath:config/properties/log4j.properties</param-value>  
</context-param>  
  <!-- log4j監聽器 -->
<listener>  
    <listener-class>  
        org.springframework.web.util.Log4jConfigListener  
    </listener-class>  
</listener>  <span style="font-family: Arial, Helvetica, sans-serif;"></web-app></span>

對了從上面可以看出我的路徑實在src下的config/properties/log4j.properties中