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.
-
Java 8 or later
Tomcat 9 requires Java 8 or later to be installed on the server so that any Java web application code can be executed. Below URL covers basic installation of the Java Development Kit package.
-
Tomcat 9
Tomcat is an open source implementation of the Java Servlet and Java Server Pages technologies, released by the Apache Software Foundation. Below URL covers the basic installation and some configuration of Tomcat 8 on your Ubuntu server.
-
MySQL 5.7
Below URL covers basic installation of MySQL server and securing MySQL
-
Maven
Maven is open source build life cycle management tool by Apache Software Foundation. This tool is required to generate server deployable build (war) from the project. Below URL covers the basic installation and some configuration of Tomcat 8 on your Ubuntu server.
The messageResource.properties
file can be find at wcp/fdahpStudyDesigner/src/main/resources/messageResource.properties
path where following configuration can be customized.
max.login.attempts=3
#Maximum continuous fail login attempts by a user.
password.resetLink.expiration.in.hour=48
#Reset password link will get expired after the specified hours.
password.expiration.in.day=90
#User password expiration in days.
lastlogin.expiration.in.day=90
#User will get locked if he has not logged in for specified days.
password.history.count=10
#User cannot reuse the last 10 generated passwords for change password.
user.lock.duration.in.minutes=30
#User lock duration in minutes after crossed Maximum continuous fail login attempts limit.
Override these values in WCP/fdahpStudyDesigner/src/main/resources/application_local.properties
with following properties settings
smtp.portvalue=25
#Should be changed to actual SMTP port
smtp.hostname=xxx.xxx.xxx.xx
#Should be changed to actual SMTP IP
fda.imgUploadPath=<Tomcat installed path>/webapps/fdaResources/
#<Tomcat installed path> will be changed to actual path
acceptLinkMail =http://localhost:8080/fdahpStudyDesigner/createPassword.do?securityToken=
login.url=http://localhost:8080/fdahpStudyDesigner/login.do
signUp.url=http://localhost:8080/fdahpStudyDesigner/signUp.do?securityToken=
#For all the above properties “localhost” will be changed to actual IP address or domain name.
db.url=localhost/fda_hphc
db.username=****
db.password=****
#“localhost” will be changed to IP address or domain name, if database is installed on different server. If database is installed on same server, it’s not required to change “db.url”.
#“db.username” value will be changed to actual username of database.
#“db.password” value will be changed to actual password of database.
hibernate.connection.url=jdbc:mysql://localhost/fda_hphc
hibernate.connection.username=****
hibernate.connection.password=****
#“localhost” will be changed to IP address or domain name, if database is installed on different server. If database is on same server, it’s not required to change “hibernate.connection.url”.
#“hibernate.connection.username” value will be changed to actual username of database.
#“hibernate.connection.password” value will be changed to actual password of database.
fda.smd.study.thumbnailPath = http://localhost:8080/fdaResources/studylogo/
fda.smd.study.pagePath = http://localhost:8080/fdaResources/studypages/
fda.smd.resource.pdfPath = http://localhost:8080/fdaResources/studyResources/
fda.smd.questionnaire.image=http://localhost/fdaResources/questionnaire/
#For all the properties “localhost” will be changed to actual IP address or domain name.
#Folder for Audit log files:
#Please create a folder "fdaAuditLogs" inside the server and replace the path "/usr/local/fdaAuditLogs/" with actual path for “fda.logFilePath” property.
#User registration server root URL:
fda.registration.root.url = https://hphci-fdama-te-ur-01.labkey.com/fdahpUserRegWS
#https://hphci-fdama-te-ur-01.labkey.com – Should be replaced with actual URL
WCP/sqlscript/HPHC_My_Studies_DB_Create_Script.sql
file script should be executed in mysql database.
To build the application the following command should run in project root folder.
mvn clean install
This command generate a deployable war file in target
folder named as fdahpStudyDesigner.war
.
Detailed instructions on War file deployment
Easiest way is to copy fdahpStudyDesigner.war
file to the /webapps directory of where Tomcat is installed locally. Restart the Tomcat.
You can also just run mvn tomcat7:deploy
After complete your deployment, to verify the application
Hit the below URL, you should see the landing page of the application for WCP application
http://localhost:8080/fdahpStudyDesigner