Home - nordpos-mobi/product-catalog GitHub Wiki
Run the following command to start the installation Tomcat 7:
$ sudo apt-get install tomcat7With the following command, you will be install the Tomcat web interface (manager webapp):
$ sudo apt-get install tomcat7-adminAfter installation, you must add a login to our Tomcat server. You will do this by editing the tomcat-users.xml file:
$ sudo nano /etc/tomcat7/tomcat-users.xmlYou need to implement this section:
<tomcat-users>
<user username="admin" password="password" roles="manager-gui,admin-gui"/>
</tomcat-users>Save and quit the tomcat-users.xml file. To put you changes into effect, restart the Tomcat service:
$ sudo service tomcat7 restartDownload a last release of the product catalog servlet:
wget https://github.com/nordpos-mobi/product-catalog/releases/download/1.0.0/product-catalog.warBefore you continue, you can unzip product-catalog.war and change context parameters of your servlet. After you need open the Tomcat web management interface in a web browser:
http://your_ip_address:8080/managerYou will by select Java servlet package in WAR file to deploy section of the web management interface:

After deployed you can management a product catalog servlet in the Applications section:

The ORMLite library of the servlet uses the settings for JDBC connection to the database of your application. You need change the values of the servlet context parameters in /WEB-INF/web.xml.
<context-param>
<param-name>db.URL</param-name>
<param-value>jdbc:mysql://localhost:3306/demo-database?useUnicode=yes&characterEncoding=UTF-8</param-value>
</context-param>
<context-param>
<param-name>db.user</param-name>
<param-value>dbuser</param-value>
</context-param>
<context-param>
<param-name>db.password</param-name>
<param-value>dbpassword</param-value>
</context-param>Also you need set application ID in the /WEB-INF/web.xml. Example, the ID parameter of Openbravo POS is an openbravopos.
<context-param>
<param-name>db.application.id</param-name>
<param-value>openbravopos</param-value>
</context-param>Before start servlet you need upgrade Openbravo POS, uniCenta oPOS and Wanda POS database.
You need insert new field to CATEGORIES of Openbravo POS, uniCenta oPOS and Wanda POS applications. Add CODE column to CATEGORIES table for generate barcode of the product.
ALTER TABLE CATEGORIES ADD COLUMN CODE VARCHAR(255);Upgrade TAXES table for supported a new tax logic algorithm for uniCenta oPOS and Wanda POS applications. Add VALIDFROM column to TAXES table.
ALTER TABLE TAXES ADD COLUMN VALIDFROM DATETIME DEFAULT '2001-01-01 00:00:00' NOT NULL;These changes do not affect to the compatibility the desktop POS and web-servlet, after upgrade you can use both the Openbravo POS and mobile POS back-end.