diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4521c12
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/nbproject/private/
+/nbbuild/
\ No newline at end of file
diff --git a/WebContent/META-INF/context.xml b/WebContent/META-INF/context.xml
new file mode 100644
index 0000000..5bee3dc
--- /dev/null
+++ b/WebContent/META-INF/context.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/WebContent/js/main.js b/WebContent/js/main.js
index b700ebc..ac3e0c0 100644
--- a/WebContent/js/main.js
+++ b/WebContent/js/main.js
@@ -1,5 +1,6 @@
// The root URL for the RESTful services
-var rootURL = "http://localhost:8080/cellar/rest/wines";
+// updated 'rootURL' to a relative path
+var rootURL = "/rest/wines";
var currentWine;
diff --git a/build.xml b/build.xml
new file mode 100644
index 0000000..6b5197b
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+ Builds, tests, and runs the project cellar.
+
+
+
diff --git a/nbproject/ant-deploy.xml b/nbproject/ant-deploy.xml
new file mode 100644
index 0000000..9bc5adf
--- /dev/null
+++ b/nbproject/ant-deploy.xml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml
new file mode 100644
index 0000000..70c63be
--- /dev/null
+++ b/nbproject/build-impl.xml
@@ -0,0 +1,1406 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set src.dir
+ Must set build.dir
+ Must set build.web.dir
+ Must set build.generated.dir
+ Must set dist.dir
+ Must set build.classes.dir
+ Must set dist.javadoc.dir
+ Must set build.test.classes.dir
+ Must set build.test.results.dir
+ Must set build.classes.excludes
+ Must set dist.war
+
+
+
+
+
+
+
+
+
+The Java EE server classpath is not correctly set up - server home directory is missing.
+Either open the project in the IDE and assign the server or setup the server classpath manually.
+For example like this:
+ ant -Dj2ee.server.home=<app_server_installation_directory>
+
+
+The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}.
+Either open the project in the IDE and assign the server or setup the server classpath manually.
+For example like this:
+ ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file)
+or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No tests executed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+The libs.CopyLibs.classpath property is not set up.
+This property must point to
+org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
+of NetBeans IDE installation and is usually located at
+<netbeans_installation>/java<version>/ant/extra folder.
+Either open the project in the IDE and make sure CopyLibs library
+exists or setup the property manually. For example like this:
+ ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set JVM to use for profiling in profiler.info.jvm
+ Must set profiler agent JVM arguments in profiler.info.jvmargs.agent
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set javac.jsp.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select a file in the IDE or set jsp.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
+
+
+ Launching ${browse.url}
+
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set debug.class
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set debug.class
+
+
+
+
+ Must set fix.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Some tests failed; see details above.
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set test.includes
+
+
+
+ Some tests failed; see details above.
+
+
+
+ Must select some files in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
+
+
+ Some tests failed; see details above.
+
+
+
+
+ Must select one file in the IDE or set test.class
+
+
+
+ Must select one file in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties
new file mode 100644
index 0000000..2011502
--- /dev/null
+++ b/nbproject/genfiles.properties
@@ -0,0 +1,11 @@
+build.xml.data.CRC32=8eff09e6
+build.xml.script.CRC32=265dc79e
+build.xml.stylesheet.CRC32=651128d4@1.38.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=8eff09e6
+nbproject/build-impl.xml.script.CRC32=d1a62a17
+nbproject/build-impl.xml.stylesheet.CRC32=4e9cae83@1.38.1.1
+nbproject/rest-build.xml.data.CRC32=5ab22b2e
+nbproject/rest-build.xml.script.CRC32=9534b0b2
+nbproject/rest-build.xml.stylesheet.CRC32=5f13befe@1.14.2
diff --git a/nbproject/project.properties b/nbproject/project.properties
new file mode 100644
index 0000000..8ea03e0
--- /dev/null
+++ b/nbproject/project.properties
@@ -0,0 +1,111 @@
+annotation.processing.enabled=true
+annotation.processing.enabled.in.editor=true
+annotation.processing.processors.list=
+annotation.processing.run.all.processors=true
+annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
+auxiliary.org-netbeans-modules-projectimport-eclipse-core.key=src=src;file=/home/shikanga/git/wine-cellar-java/WebContent/WEB-INF/lib/jersey-core-1.9.1.jar;file=/home/shikanga/git/wine-cellar-java/WebContent/WEB-INF/lib/mysql-connector-java-5.1.18-bin.jar;file=/home/shikanga/git/wine-cellar-java/WebContent/WEB-INF/lib/jackson-jaxrs-1.8.3.jar;file=/home/shikanga/git/wine-cellar-java/WebContent/WEB-INF/lib/jsr311-api-1.1.1.jar;file=/home/shikanga/git/wine-cellar-java/WebContent/WEB-INF/lib/jackson-mapper-asl-1.8.3.jar;file=/home/shikanga/git/wine-cellar-java/WebContent/WEB-INF/lib/jersey-client-1.9.1.jar;file=/home/shikanga/git/wine-cellar-java/WebContent/WEB-INF/lib/jackson-core-asl-1.8.3.jar;file=/home/shikanga/git/wine-cellar-java/WebContent/WEB-INF/lib/asm-3.1.jar;file=/home/shikanga/git/wine-cellar-java/WebContent/WEB-INF/lib/jersey-json-1.9.1.jar;file=/home/shikanga/git/wine-cellar-java/WebContent/WEB-INF/lib/jersey-server-1.9.1.jar;file=/home/shikanga/git/wine-cellar-java/WebContent/WEB-INF/lib/jackson-xc-1.8.3.jar;file=/home/shikanga/git/wine-cellar-java/WebContent/WEB-INF/lib/jettison-1.1.jar;output=build/classes;web=/WebContent;context=cellar;
+auxiliary.org-netbeans-modules-projectimport-eclipse-core.project=.
+auxiliary.org-netbeans-modules-projectimport-eclipse-core.timestamp=1364933486000
+auxiliary.org-netbeans-modules-projectimport-eclipse-core.workspace=/home/shikanga/Eclipse_Projects/Christophe-Coenraets
+build.classes.dir=${build.web.dir}/WEB-INF/classes
+build.classes.excludes=**/*.java,**/*.form
+build.dir=nbbuild
+build.generated.dir=${build.dir}/generated
+build.generated.sources.dir=${build.dir}/generated-sources
+build.test.classes.dir=${build.dir}/test/classes
+build.test.results.dir=${build.dir}/test/results
+build.web.dir=${build.dir}/web
+build.web.excludes=${build.classes.excludes}
+client.urlPart=
+compile.jsps=false
+conf.dir=conf
+debug.classpath=${build.classes.dir}:${javac.classpath}
+debug.test.classpath=\
+ ${run.test.classpath}
+display.browser=true
+dist.dir=dist
+dist.ear.war=${dist.dir}/${war.ear.name}
+dist.javadoc.dir=${dist.dir}/javadoc
+dist.war=${dist.dir}/${war.name}
+excludes=
+file.reference.asm-3.1.jar=WebContent/WEB-INF/lib/asm-3.1.jar
+file.reference.jackson-core-asl-1.8.3.jar=WebContent/WEB-INF/lib/jackson-core-asl-1.8.3.jar
+file.reference.jackson-jaxrs-1.8.3.jar=WebContent/WEB-INF/lib/jackson-jaxrs-1.8.3.jar
+file.reference.jackson-mapper-asl-1.8.3.jar=WebContent/WEB-INF/lib/jackson-mapper-asl-1.8.3.jar
+file.reference.jackson-xc-1.8.3.jar=WebContent/WEB-INF/lib/jackson-xc-1.8.3.jar
+file.reference.jersey-client-1.9.1.jar=WebContent/WEB-INF/lib/jersey-client-1.9.1.jar
+file.reference.jersey-core-1.9.1.jar=WebContent/WEB-INF/lib/jersey-core-1.9.1.jar
+file.reference.jersey-json-1.9.1.jar=WebContent/WEB-INF/lib/jersey-json-1.9.1.jar
+file.reference.jersey-server-1.9.1.jar=WebContent/WEB-INF/lib/jersey-server-1.9.1.jar
+file.reference.jettison-1.1.jar=WebContent/WEB-INF/lib/jettison-1.1.jar
+file.reference.jsr311-api-1.1.1.jar=WebContent/WEB-INF/lib/jsr311-api-1.1.1.jar
+file.reference.mysql-connector-java-5.1.18-bin.jar=WebContent/WEB-INF/lib/mysql-connector-java-5.1.18-bin.jar
+file.reference.wine-cellar-java-src=src
+includes=**
+j2ee.compile.on.save=true
+j2ee.copy.static.files.on.save=true
+j2ee.deploy.on.save=true
+j2ee.platform=1.5
+j2ee.platform.classpath=${j2ee.server.home}/lib/tomcat-i18n-fr.jar:${j2ee.server.home}/lib/tomcat-util.jar:${j2ee.server.home}/lib/tomcat-i18n-ja.jar:${j2ee.server.home}/lib/el-api.jar:${j2ee.server.home}/lib/catalina-ha.jar:${j2ee.server.home}/lib/tomcat-api.jar:${j2ee.server.home}/lib/tomcat-coyote.jar:${j2ee.server.home}/lib/jasper-el.jar:${j2ee.server.home}/lib/jasper.jar:${j2ee.server.home}/lib/ecj-3.7.2.jar:${j2ee.server.home}/lib/tomcat-i18n-es.jar:${j2ee.server.home}/lib/catalina-tribes.jar:${j2ee.server.home}/lib/tomcat-dbcp.jar:${j2ee.server.home}/lib/jsp-api.jar:${j2ee.server.home}/lib/catalina-ant.jar:${j2ee.server.home}/lib/servlet-api.jar:${j2ee.server.home}/lib/tomcat-jdbc.jar:${j2ee.server.home}/lib/catalina.jar:${j2ee.server.home}/lib/annotations-api.jar
+j2ee.server.type=Tomcat
+jar.compress=false
+java.source.based=true
+javac.classpath=\
+ ${file.reference.jersey-server-1.9.1.jar}:\
+ ${file.reference.jersey-core-1.9.1.jar}:\
+ ${file.reference.jackson-mapper-asl-1.8.3.jar}:\
+ ${file.reference.jettison-1.1.jar}:\
+ ${file.reference.asm-3.1.jar}:\
+ ${file.reference.mysql-connector-java-5.1.18-bin.jar}:\
+ ${file.reference.jackson-core-asl-1.8.3.jar}:\
+ ${file.reference.jsr311-api-1.1.1.jar}:\
+ ${file.reference.jersey-client-1.9.1.jar}:\
+ ${file.reference.jersey-json-1.9.1.jar}:\
+ ${file.reference.jackson-jaxrs-1.8.3.jar}:\
+ ${file.reference.jackson-xc-1.8.3.jar}
+# Space-separated list of extra javac options
+javac.compilerargs=
+javac.debug=true
+javac.deprecation=false
+javac.processorpath=\
+ ${javac.classpath}
+javac.source=1.6
+javac.target=1.6
+javac.test.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}
+javac.test.processorpath=\
+ ${javac.test.classpath}
+javadoc.additionalparam=
+javadoc.author=false
+javadoc.encoding=${source.encoding}
+javadoc.noindex=false
+javadoc.nonavbar=false
+javadoc.notree=false
+javadoc.preview=true
+javadoc.private=false
+javadoc.splitindex=true
+javadoc.use=true
+javadoc.version=false
+javadoc.windowtitle=
+lib.dir=WebContent/WEB-INF/lib
+no.dependencies=false
+persistence.xml.dir=${conf.dir}
+platform.active=default_platform
+resource.dir=setup
+rest.config.type=user
+run.test.classpath=\
+ ${javac.test.classpath}:\
+ ${build.test.classes.dir}
+# Space-separated list of JVM arguments used when running a class with a main method or a unit test
+# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value):
+runmain.jvmargs=
+source.encoding=UTF-8
+source.root=.
+src.dir=${file.reference.wine-cellar-java-src}
+test.src.dir=
+war.content.additional=
+war.ear.name=${war.name}
+war.name=cellar.war
+web.docbase.dir=WebContent
+webinf.dir=WebContent/WEB-INF
diff --git a/nbproject/project.xml b/nbproject/project.xml
new file mode 100644
index 0000000..72d3c7f
--- /dev/null
+++ b/nbproject/project.xml
@@ -0,0 +1,70 @@
+
+
+ org.netbeans.modules.web.project
+
+
+
+
+
+
+
+ cellar
+ 1.6.5
+
+
+ ${file.reference.jersey-server-1.9.1.jar}
+ WEB-INF/lib
+
+
+ ${file.reference.jersey-core-1.9.1.jar}
+ WEB-INF/lib
+
+
+ ${file.reference.jackson-mapper-asl-1.8.3.jar}
+ WEB-INF/lib
+
+
+ ${file.reference.jettison-1.1.jar}
+ WEB-INF/lib
+
+
+ ${file.reference.asm-3.1.jar}
+ WEB-INF/lib
+
+
+ ${file.reference.mysql-connector-java-5.1.18-bin.jar}
+ WEB-INF/lib
+
+
+ ${file.reference.jackson-core-asl-1.8.3.jar}
+ WEB-INF/lib
+
+
+ ${file.reference.jsr311-api-1.1.1.jar}
+ WEB-INF/lib
+
+
+ ${file.reference.jersey-client-1.9.1.jar}
+ WEB-INF/lib
+
+
+ ${file.reference.jersey-json-1.9.1.jar}
+ WEB-INF/lib
+
+
+ ${file.reference.jackson-jaxrs-1.8.3.jar}
+ WEB-INF/lib
+
+
+ ${file.reference.jackson-xc-1.8.3.jar}
+ WEB-INF/lib
+
+
+
+
+
+
+
+
+
+
diff --git a/nbproject/rest-build.xml b/nbproject/rest-build.xml
new file mode 100644
index 0000000..85a7d65
--- /dev/null
+++ b/nbproject/rest-build.xml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.netbeans.rest.application.config;
+/**
+ * This class is generated by the NetBeans IDE,
+ * and registers all REST root resources created in the project.
+ * Please, DO NOT EDIT this class unless you really need and
+ * understand the results of changes.
+ * It is safe to change REST resources path value of
+ * ApplicationPath annotation. It can be done also via UI action
+ * called on RESTful Web Services node ( REST Resources Configuration dialog ).
+ *
+ */
+@javax.ws.rs.ApplicationPath("${rest.resources.path}")
+public class ApplicationConfig extends javax.ws.rs.core.Application {
+}
+
+