Skip to content

hari2401/CarRentWebApp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Car rent Java EE web application

Table of contents

  1. Preparing required instruments
  1. Installing, building, preparing to run
  1. The application deploying

Car rent application studing project.

Preparing required instruments

Installing MySQL

The application requires MySQL version 5.7 and higher.

MySQL distributive

MySQL install instruction

Installing Java Development Kit

The application requires Java Development Kit version 8 (1.8)

JDK 8 download page

JDK install instruction

Installing Tomcat

The application has been tested in Tomcat 8.5 Download and install Tomcat 8.5

Tomcat 8.5 download page

Tomcat install instruction

Preparing a deployment directory

Remove or move the content of tomcat/webapps/ROOT to another directory.

Installing Git version control system

Git installation is optional, in order to simplify downloading application from git-hub.

Git download page

Installing maven build automation system

Maven 3.3 build automation system is required to build, test and deploy application.

Maven download page

Maven install instruction

Installing, building, preparing to run

Downdloading the application

To download the application use the following in command line:

git clone https://github.com/MaximChshelokov/CarRentWebApp.git

Database dump deploying

To deploy the database dump type in command line:

mysql -u root -p < project path/db_dump.sql

Then input the root user's password. Database scheme will be created automatically.

To deploy the test database dump (whether is required to successfully build the project) input into command line:

mysql -u root -p < project path/test_db_dump.sql

Then input the root user's password. Database scheme will be created automatically.

Database user creating

The application uses default database username car_rent_app (and password Un3L41NoewVA). To create the user run the mysql terminal and input:

CREATE USER 'car_rent_app'@'localhost' IDENTIFIED BY 'Un3L41NoewVA';

If you want to use another username and password, you have to specify them to database properties file

Use the following command to grant to the user access to the database (scheme):

GRANT SELECT, INSERT, UPDATE, DELETE ON * . * TO 'car_rent_app'@'localhost';

Setting up the timezone for the Windows users.

There is an error might occure during connect to the database if you're using the Windows OS because of MySQL couldn't set timezone automatically. To fix it run the mysql terminal and input:

SET GLOBAL time_zone = 'YOUR TIMEZONE';

Give your timezone in +7:00 format instead of YOUR TIMEZONE.

Setting up the project

In order to use an arbitrary username and password, change the following lines in src/main/resources/db_params.properties file:

LOGIN=database user's name
PASSWORD=database user's password

You also could change another database connection parameters, if necessery:

URL=jdbc:mysql://localhost/DATABASE NAME?autoReconnect=true&useSSL=false&characterEncoding=utf-8
POOL_SIZE=CONNECTION POOS SIZE

Application building

Input the following command to build the project:

mvn clean install

The application deploying

Deploying to Tomcat

Copy directory project path/target/car_rent-1.0-SNAPSHOT/ content to the tomcat/webapps/ROOT directory. Note: target directory creation covered in Application building

Запуск Tomcat

Для запуска контейнера Tomcat перейдите в директорию tomcat/bin и в командной строке выполните:

startup

Открытие приложения в браузере

Чтобы открыть страницу приложения, в браузере в адресной строке введите localhost:8080 и нажмите "перейти". Для того, чтобы войти под администратором, используйте логин [email protected] и пароль admin1. Чтобы войти под пользователем, логин [email protected] и пароль client.

About

Study project Car rental webapp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 77.1%
  • CSS 10.4%
  • PLpgSQL 9.7%
  • JavaScript 2.8%