]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Added Serializable to BaseBasket + added log4j-web and filter for it (all URLs)
authorRoland Haeder <roland@mxchange.org>
Mon, 24 Aug 2015 13:04:30 +0000 (15:04 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 25 Aug 2015 08:32:32 +0000 (10:32 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

lib/log4j-web-2.3.jar [new file with mode: 0644]
nbproject/build-impl.xml
nbproject/genfiles.properties
nbproject/project.properties
nbproject/project.xml
src/java/org/mxchange/pizzaapplication/basket/BaseBasket.java
web/WEB-INF/web.xml

diff --git a/lib/log4j-web-2.3.jar b/lib/log4j-web-2.3.jar
new file mode 100644 (file)
index 0000000..e87ef9a
Binary files /dev/null and b/lib/log4j-web-2.3.jar differ
index b0f7fcc0a1d40e3645e42499925a33b6e14d1885..da3c539107b3e79ae05c1cee003f40297ca1a3b2 100644 (file)
@@ -1027,6 +1027,7 @@ exists or setup the property manually. For example like this:
         <copyfiles files="${file.reference.log4j-core-2.3.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.commons-codec-1.10.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${libs.MySQLDriver.classpath}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+        <copyfiles files="${file.reference.log4j-web-2.3.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <mkdir dir="${build.web.dir}/META-INF"/>
         <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
     </target>
@@ -1036,6 +1037,7 @@ exists or setup the property manually. For example like this:
         <copyfiles files="${file.reference.log4j-core-2.3.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.commons-codec-1.10.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${libs.MySQLDriver.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
+        <copyfiles files="${file.reference.log4j-web-2.3.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
     </target>
     <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
         <delete dir="${build.web.dir}/WEB-INF/lib"/>
index 9e11a91ac860285468fdadadcc537623d0301f66..2ef60e31bb066b7244752171f7224d799b5e8f21 100644 (file)
@@ -1,8 +1,8 @@
-build.xml.data.CRC32=04817f3c
+build.xml.data.CRC32=9e7a0782
 build.xml.script.CRC32=a6f5a733
 build.xml.stylesheet.CRC32=651128d4@1.68.1.1
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=04817f3c
-nbproject/build-impl.xml.script.CRC32=7f4d7ef9
+nbproject/build-impl.xml.data.CRC32=9e7a0782
+nbproject/build-impl.xml.script.CRC32=221b1210
 nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.68.1.1
index d63eef99e4bc5c169ed9733ceb026e672223b835..d02847ea086bc456bea162c6437063e0f3ccfb35 100644 (file)
@@ -31,6 +31,7 @@ file.reference.commons-codec-1.10.jar=lib/commons-codec-1.10.jar
 file.reference.log4j-api-2.3.jar=lib/log4j-api-2.3.jar
 file.reference.log4j-core-2.3.jar=lib/log4j-core-2.3.jar
 file.reference.jcore.jar=lib/jcore.jar
+file.reference.log4j-web-2.3.jar=lib\\log4j-web-2.3.jar
 includes=**
 j2ee.compile.on.save=true
 j2ee.copy.static.files.on.save=true
@@ -49,7 +50,8 @@ javac.classpath=\
     ${file.reference.log4j-api-2.3.jar}:\
     ${file.reference.log4j-core-2.3.jar}:\
     ${file.reference.commons-codec-1.10.jar}:\
-    ${libs.MySQLDriver.classpath}
+    ${libs.MySQLDriver.classpath}:\
+    ${file.reference.log4j-web-2.3.jar}
 # Space-separated list of extra javac options
 javac.compilerargs=-Xlint:unchecked
 javac.debug=true
@@ -72,6 +74,7 @@ javadoc.notree=false
 javadoc.preview=true
 javadoc.private=true
 javadoc.reference.commons-codec-1.10.jar=/home/quix0r/public_html/JARs/commons-codec-1.10-javadoc.jar
+javadoc.reference.log4j-web-2.3.jar=../../../JARs/log4j-web-2.3-javadoc.jar
 javadoc.splitindex=true
 javadoc.use=true
 javadoc.version=true
@@ -90,6 +93,7 @@ runmain.jvmargs=
 source.encoding=UTF-8
 source.reference.commons-codec-1.10.jar=/home/quix0r/public_html/JARs/commons-codec-1.10-sources.jar
 source.reference.jcore.jar=../jcore/src
+source.reference.log4j-web-2.3.jar=../../../JARs/log4j-web-2.3-sources.jar
 source.root=src
 src.dir=${source.root}/java
 test.src.dir=test
index d97b82e6b62e05cfcec752c0fe25ff5437f4bca6..b2afc27b6062b98617f19fb19f312ef6d84e028e 100644 (file)
                     <file>${libs.MySQLDriver.classpath}</file>
                     <path-in-war>WEB-INF/lib</path-in-war>
                 </library>
+                <library dirs="200">
+                    <file>${file.reference.log4j-web-2.3.jar}</file>
+                    <path-in-war>WEB-INF/lib</path-in-war>
+                </library>
             </web-module-libraries>
             <web-module-additional-libraries/>
             <source-roots>
index be976ecef0ec00bb870bbf4eee4b6242c69ca9cd..93886702607f0fa3a8058734e9991e823c685c49 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.pizzaapplication.basket;
 
+import java.io.Serializable;
 import java.sql.SQLException;
 import java.text.MessageFormat;
 import java.util.LinkedHashMap;
@@ -32,7 +33,10 @@ import org.mxchange.pizzaapplication.product.Product;
  *
  * @author Roland Haeder
  */
-public class BaseBasket extends BaseFrameworkSystem implements Basket<AddableBasketItem> {
+public class BaseBasket extends BaseFrameworkSystem implements Basket<AddableBasketItem>, Serializable {
+       // Serial number
+       private static final long serialVersionUID = 784396762230845717L;
+
        /**
         * Item map
         */
index 78c62db097cb394c560c99d4c02363d4c93ae20a..69d45229d509465e4670bab8b459f0993fbe4b72 100644 (file)
         <filter-name>Utf8ServletFilter</filter-name>
         <filter-class>org.mxchange.pizzaapplication.filter.servlet.utf8.Utf8ServletFilter</filter-class>
     </filter>
+    <filter>
+        <description>A servlet filter for logging</description>
+        <filter-name>Log4jServletFilter</filter-name>
+        <filter-class>org.apache.logging.log4j.web.Log4jServletFilter</filter-class>
+    </filter>
     <filter>
         <description>A filter for handling added basket items</description>
         <filter-name>BasketItemAddedFilter</filter-name>
         <filter-name>BasketItemAddedFilter</filter-name>
         <url-pattern>/form_handler/add_item.jsp</url-pattern>
     </filter-mapping>
+    <filter-mapping>
+        <filter-name>Log4jServletFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
     <filter-mapping>
         <filter-name>Utf8ServletFilter</filter-name>
         <url-pattern>/*</url-pattern>