EECS4413 Project
- Install MySQL
Make sure you setup MySQL user 'root' without any password, and remain the default port: 3306mysql -u root -p create database book_store; exit
mysql -u root book_store -p < db/db.sql
- Install Apache Tomcat 8.5
- The following jar files should be in the WebContent/WEB-INF/lib directory
• javax.json-1.0.jar
• jersey-bundle-1.19.1.jar
• mysql-connector-java-5.1.45-bin.jar - Configure Eclipse with Tomcat (in Java EE perspective, explore the Servers tab and add the Tomcat directory)
- Right click on the project name -> Build Path -> Configure Build path... -> Libraries -> Add Library
• EAR Libraries
• JRE System Library
• Web App Libraries
• Server Runtime -> Apache Tomcat v8.5
- Add this to your tomcat directory's
conf/server.xml
, where "" is the location of the Keystore, or alternatively move the Keystore somewhere else. The keystore is the one at the root of this repository
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keyAlias="selfsigned_tomcat" keystoreFile="<pathToKeystore>/KeyStore.jks"
keystorePass="123456" />
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
Add the following to your tomcat directory's conf/web.xml
:
<security-constraint>
<web-resource-collection>
<web-resource-name>Entire Application</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<!-- auth-constraint goes here if you requre authentication -->
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
This will rewrite all requests to port 8080 via Secure socket layer.