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/
- User authentication (Login page)
- Database connection with PostgreSQL
- JSP-based frontend
- Maven for dependency management
- Docker support
Ensure you have the following installed:
- Java 17 or later
- Apache Tomcat 9
- PostgreSQL database
- Maven (for dependency management)
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);Ensure your pom.xml contains:
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.5.4</version>
</dependency>Run:
mvn clean install- Copy the
.warfile to Tomcat’swebappsdirectory. - Start Tomcat:
catalina.sh runOpen your browser and navigate to:
http://localhost:8080/your-app-name
Issue: PostgreSQL Driver Not Found
- Ensure
postgresql-xx.x.x.jaris inWEB-INF/lib/. - Restart Tomcat after adding the dependency.
Issue: Page Not Updating
- Clear your browser cache.
- Restart Tomcat and redeploy the WAR file.
This project is licensed under MIT License.