diff webapp/WEB-INF/web.xml @ 16:33d7bd3c0990

Adding logging capabilities with log4j to the servlet; adding the log4j 1.2 class as well
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Wed, 04 Dec 2013 19:48:02 +0000
parents 02c01c48cec1
children
line wrap: on
line diff
--- a/webapp/WEB-INF/web.xml	Tue Dec 03 12:19:31 2013 +0000
+++ b/webapp/WEB-INF/web.xml	Wed Dec 04 19:48:02 2013 +0000
@@ -4,13 +4,26 @@
            xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
 		  http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
            version="2.5">
-
     <servlet>
         <servlet-name>HumanEchoServlet</servlet-name>
         <servlet-class>HumanEchoServlet</servlet-class>
     </servlet>
+
+    <servlet>
+      <servlet-name>log4j-init</servlet-name>
+      <servlet-class>com.AppName.servlets.Log4jInit</servlet-class>
+      <init-param>
+        <param-name>log4j-init-file</param-name>
+        <param-value>WEB-INF/classes/log4j.properties</param-value>
+      </init-param>
+      <load-on-startup>1</load-on-startup>
+    </servlet>
+
     <servlet-mapping>
         <servlet-name>HumanEchoServlet</servlet-name>
         <url-pattern>/HumanEcho</url-pattern>
     </servlet-mapping>
 </web-app>
+
+
+