Skip to content

pedromdcr/MulticertExercise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MulticertExercise

Interview exercise for a company.

Getting Started

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.

Prerequisites

Java 1.7 and JDK 7

This project requires JDK 7 which you can download here.

Tomcat 8

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.

PostgreSQL 9.6.3

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.

Maven 3.3.9

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>

Installing

Instructions sent via email. Further improvements will be made soon if possible.

Deployment

Currently only supported via Eclipse with Tomcat.

Built With

About

Interview exercise for a company.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages