Hotel Booking System — Installation and Setup


Overview
A Java web application packaged with Maven and deployed to GlassFish, backed by a MySQL database. The guide below consolidates and clarifies the steps you provided, preserves your exact settings, and adds explicit sequencing and checks for a clean first run. This summary is derived solely from your text.
Prerequisites
Java Development Kit, version 11 or higher
IntelliJ IDEA
Maven
MySQL Server and MySQL Workbench
GlassFish Server
Tech Stack
Language: Java
Build: Maven
App Server: GlassFish
Database: MySQL
IDE: IntelliJ IDEA
Installation Steps
1) Get the source
Download the project to your local machine.
2) Configure the database
Open MySQL Workbench.
Create a new connection with:
Username: root
Password: root3306
Run the provided database schema script. This should create the hoteldb database and required objects.
3) Configure the application
Open the project in IntelliJ IDEA.
Allow Maven to download all dependencies.
Configure GlassFish Server in IntelliJ project settings so you can deploy directly from the IDE.
4) Verify application database settings
Open database.properties in the project.
Confirm the connection details match your MySQL setup, including username root, password root3306, host, port, and database name hoteldb.
Access and Credentials
Manager access is listed as “Default Manager Login.”
Password: 6969.
The username is not provided in your text. You will need the corresponding manager username to log in. For security, change the default credentials immediately after first access.
Quick Start
Start the MySQL server.
Deploy the application to GlassFish.
Open http://localhost:8080/hotel-booking-system in your browser.
Troubleshooting
Database connectivity
Recheck database.properties for URL, user, password, and schema hoteldb.
Ensure MySQL is running and accessible on the expected port.
Build and dependencies
In IntelliJ, run Maven reload to resolve dependencies.
Server configuration
Confirm GlassFish is correctly registered in IntelliJ and the app deploys without errors.
If the app does not load, check GlassFish server logs for stack traces and confirm port 8080 is free.



