AlexeyPsarev / store

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Building and deploying the application

  1. You should have the Apache Tomcat 7 installed in your computer.

  2. To build the application change your current directory to the store subdirectory and type:

mvn package

The Store application uses the H2 database. All necessary tables will be created during application building.

  1. Copy the store.war file to the webapps subdirectory of your Tomcat root directory.

  2. Open the context.xml file located in the conf subdirectory of your Tomcat root directory. Create a resource definition for your Context. The Context element should look like the following.

<Context>

	<Resource name="jdbc/UsersDB" auth="Container" type="javax.sql.DataSource"
        maxTotal="100" maxIdle="30" maxWaitMillis="10000"
        username="admin" password="admin" driverClassName="org.h2.Driver"
		url="jdbc:h2:~/PUBLIC;AUTO_SERVER=TRUE;AUTO_SERVER_PORT=8082;SCHEMA=PUBLIC;DB_CLOSE_ON_EXIT=FALSE"/>

</Context>

Save and close that file.

  1. Launch the Tomcat Server.

Open a browser and browse to http://localhost:8080/store .

About


Languages

Language:Java 99.5%Language:JavaScript 0.5%