Interview exercise for a company.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
This project requires JDK 7 which you can download here.
Download Tomcat. Go into your Tomcat 8.x install directory and add the following code to the file server.xml
adjusting the path to the keystore (the SSL certificate) accordingly:
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="/Users/Pedro/workspace/MulticertWS/multicertKey"
keystorePass="multicert" />
In the same directory, add the following code to context.xml
nested inside the <Context>
tag:
<Resource name="jdbc/postgres" auth="Container"
type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://127.0.0.1:5432/multicertdb"
username="postgres" password="multicert" maxTotal="20" maxIdle="10" maxWaitMillis="-1"/>
Finally add the following to tomcat-users.xml
, in case you haven't set it already:
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="admin" password="password" roles="manager-gui,manager-script" />
Use any username
and password
you'd like, but use these when you change Maven settings below.
This project uses PostgreSQL which you can download here.
There is a database dump file called multicertdb.sql
in the project root folder. To reload it in your machine open a command prompt in this folder and type the following:
psql -d newdb -f multicertdb.sql
This reloads multicertdb into a freshly created database named newdb
.
We use Maven for dependency management in this project. Make sure to add the following definition to the settings.xml
file in your Maven install directory (nest it inside the <settings>
tag):
<server>
<id>TomcatServer</id>
<username>admin</username>
<password>password</password>
</server>
Instructions sent via email. Further improvements will be made soon if possible.
Currently only supported via Eclipse with Tomcat.
- Eclipse - My Java IDE of choice
- PostgreSQL - The RDBMS used
- Maven - Dependency Management
- Tomcat - Used to deploy web services