Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Web Application with PostgreSQL

Overview

This project is a Java web application built with JSP and Servlets, using PostgreSQL as the database. The project is deployed on an Apache Tomcat server. the url for the project : https://personal-production-21dd.up.railway.app/

Features

  • User authentication (Login page)
  • Database connection with PostgreSQL
  • JSP-based frontend
  • Maven for dependency management
  • Docker support

Prerequisites

Ensure you have the following installed:

  • Java 17 or later
  • Apache Tomcat 9
  • PostgreSQL database
  • Maven (for dependency management)

Setup Instructions

1️⃣ Clone the Repository

2️⃣ Configure Database

Create a PostgreSQL database and user:

CREATE DATABASE yourdb;
CREATE USER youruser WITH ENCRYPTED PASSWORD 'yourpassword';
GRANT ALL PRIVILEGES ON DATABASE yourdb TO youruser;

Update DBConnection.java with your database credentials:

String url = "jdbc:postgresql://localhost:5432/yourdb";
String username = "youruser";
String password = "yourpassword";
Connection conn = DriverManager.getConnection(url, username, password);

3️⃣ Add PostgreSQL JDBC Driver

Ensure your pom.xml contains:

<dependency>
    <groupId>org.postgresql</groupId>
    <artifactId>postgresql</artifactId>
    <version>42.5.4</version>
</dependency>

Run:

mvn clean install

4️⃣ Deploy to Tomcat

  • Copy the .war file to Tomcat’s webapps directory.
  • Start Tomcat:
catalina.sh run

5️⃣ Access the Application

Open your browser and navigate to:

http://localhost:8080/your-app-name

Troubleshooting

Issue: PostgreSQL Driver Not Found

  • Ensure postgresql-xx.x.x.jar is in WEB-INF/lib/.
  • Restart Tomcat after adding the dependency.

Issue: Page Not Updating

  • Clear your browser cache.
  • Restart Tomcat and redeploy the WAR file.

License

This project is licensed under MIT License.

About

A full-stack personal finance manager built with Java Servlets, JDBC, and PostgreSQL. Features include income and expense tracking, budgeting, savings goals, user management, and monthly reports. Built with Maven for dependency management and project build.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages