Installation manual - Pacek99/faersREST GitHub Wiki

Installation manual for project fearsREST:

System requirements:

  • have Apache Tomcat server in your computer
  • have access to the internet

Link to Github project:

Comment: To run this part of the project u firstly need to have already created database via an import project from colleague G. Mohňanský, link to his project: https://github.com/mohnanskygabriel/faersDb

Steps:

1.Download this Maven project.

2.In project directory find file DaoFactory.java, open it and in the class constructor rewrite absolute path to file config.txt to your actual absolute path. Then in project directory find file config.txt, open it and in the first line rewrite "sql" to your actual password to database and save file.

3.Open the command line in the project directory and use command: mvn package

4.In the target folder, find the faersREST.war file and move it into webapps folder in your Apache Tomcat server directory.

5.Open the command line in the /bin directory of your Apache Tomcat server.

6.Start Apache Tomcat via Command Line. E.g. in Windows with command: catalina.bat start

After executing all steps we can verify if the app is working by entering "localhost:8080/faersREST/" to browser. It should display page with information text "Application faersREST is working!".

You can verify the functionality of REST service requests via Postman or normally in browser.

Syntax of requests:

notice: in any request containing BRAND_NAME, SUBSTANCE_NAME or MANUFACTURER_NAME, in case that this argument consists of more than one word (or subword) separated by space character " ", then in request url you have to replace those space characters with "%20"