Giter Club home page Giter Club logo

carrentwebapp's Introduction

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.

carrentwebapp's People

Contributors

maximchshelokov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.