Skip to content

CanarysPlayground/JavaWebApplication-Demo

Repository files navigation

Simple Hotel Management Website

Developer: Sourav

Hotel Management Website

Overview

This project implements a Simple Hotel Management Website that allows hotel staff to manage reservations and other essential tasks. It is designed using Java 11 and built with Maven, with the application running in a Tomcat 9 server.

Prerequisites

To run and build this project, ensure you have the following tools installed:

  • Java 11: Java Development Kit (JDK) 11 or higher.
  • Maven: For building the project and managing dependencies.
  • Docker: For containerizing the application and running it in a consistent environment.
  • Tomcat 9: The application server used to deploy the web application.

Project Structure

The repository contains the following key components:

├── .github/
│   └── workflows/           # GitHub Actions for CI/CD
│
├── .zap/                    # ZAP scanning rules for security testing
│   └── rules.tsv            # Custom ZAP rules
│
├── src/                     # Source code for the application
│   └── main/
│       └── webapp/          # Web resources (JSP files, images, etc.)
│           └── index.jsp    # Home page of the web application
│
├── Dockerfile               # Docker configuration for containerizing the app
├── pom.xml                  # Maven project configuration
├── README.md                # Project documentation
└── ruleset.xml              # ZAP configuration file for security testing

Building the Project

To build and package the project, follow these steps:

  1. Clone the repository:

    git clone <repo-url>
    cd <repo-directory>
  2. Install the dependencies and build the project:

    mvn clean install

    This will compile the Java code, run tests, and create a .war file to be deployed on Tomcat.

Running the Application

Using Docker

You can run the application in a Docker container using the provided Dockerfile. This is useful for running the app in a controlled, isolated environment.

  1. Build the Docker image:

    docker build -t hotel-management .
  2. Run the Docker container:

    docker run -p 8080:8080 hotel-management

    The application will be available at http://localhost:8080 on your browser.

Using Tomcat

Alternatively, you can deploy the .war file generated by Maven to your Tomcat server.

  1. Copy the .war file from the target/ directory to your Tomcat webapps/ directory.
  2. Start Tomcat and navigate to http://localhost:8080/<your-app-name> to access the application.

Configuration

  • Database: Ensure the database connection (if applicable) is correctly configured for the application to manage hotel reservations and other data.
  • Security: The project includes ZAP scanning configurations (.zap/rules.tsv and ruleset.xml) to ensure security best practices.

Contributing

Feel free to fork this repository and submit pull requests. Contributions are always welcome!

Connect with Me

You can reach out to me through the following platforms:

Mail
Linkedin
Stack Overflow

GitHub Certificates

Here are some of my certificates from GitHub:

Credly Badge Credly Badge Credly Badge Credly Badge Credly Badge

#task 1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors