Sfoglia il codice sorgente

Added log4j configuration servlet context listener

peter_backlund 17 anni fa
parent
commit
88a6b52e99
1 ha cambiato i file con 9 aggiunte e 4 eliminazioni
  1. 9
    4
      dddsample/src/main/webapp/WEB-INF/web.xml

+ 9
- 4
dddsample/src/main/webapp/WEB-INF/web.xml Vedi File

@@ -10,12 +10,13 @@
10 10
     <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
11 11
   </listener>
12 12
 
13
-  <listener>
14
-    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
15
-  </listener>
13
+  <context-param>
14
+    <param-name>log4jConfigLocation</param-name>
15
+    <param-value>classpath:log4j.properties</param-value>
16
+  </context-param>
16 17
 
17 18
   <listener>
18
-    <listener-class>se.citerus.dddsample.application.util.SampleDataGenerator</listener-class>
19
+    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
19 20
   </listener>
20 21
 
21 22
   <context-param>
@@ -30,6 +31,10 @@
30 31
     </param-value>
31 32
   </context-param>
32 33
 
34
+  <listener>
35
+    <listener-class>se.citerus.dddsample.application.util.SampleDataGenerator</listener-class>
36
+  </listener>
37
+  
33 38
   <servlet>
34 39
     <servlet-name>tracking</servlet-name>
35 40
     <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>