LocalHelp is a role-based local professional-services search and booking application built with Java 21, Jakarta Servlet 6, JSP, JDBC, MySQL 8.4+, and Tomcat 10.1. It intentionally uses no Maven, Gradle, JavaScript framework, or external authentication service.
- Install JDK 21, Tomcat 10.1, MySQL, and MySQL Connector/J.
- Copy
mysql-connector-j-*.jarintoWebContent\WEB-INF\lib. - Run
database/database.sqlin MySQL. - Configure
LOCALHELP_DB_URL,LOCALHELP_DB_USER, andLOCALHELP_DB_PASSWORDas environment variables or Java system properties. The default URL targets a locallocalhelp_dbdatabase. Do not rely on a blank-passwordrootaccount: MySQL commonly rejects it withusing password: NO. - Set the
TOMCATpath inbuild.batanddeploy.bat, then runbuild.batordeploy.bat.
Customers register, search by category and location, filter urgent availability, view provider profiles, create or cancel bookings, and review booking history. Providers manage their profile and accept, reject, or complete customer requests. Administrators can activate or deactivate provider listings.
Passwords are stored using PBKDF2-HMAC-SHA256 through PasswordUtil; the schema does not use plaintext passwords. The administrator setup notes in database/database.sql explain how to create a password hash. All database writes use prepared statements, sessions are invalidated on login, and protected routes are enforced by AuthFilter.
The database connection reads these environment variables or matching Java system properties:
LOCALHELP_DB_URLLOCALHELP_DB_USERLOCALHELP_DB_PASSWORD
The default URL is:
jdbc:mysql://localhost:3306/localhelp_db?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
On Windows, set credentials in the same process that starts Tomcat, before running startup.bat:
set "LOCALHELP_DB_USER=localhelp_app"
set "LOCALHELP_DB_PASSWORD=choose-a-local-password"Create the application account once from a MySQL administrator session:
CREATE USER 'localhelp_app'@'localhost' IDENTIFIED BY 'choose-a-local-password';
GRANT ALL PRIVILEGES ON localhelp_db.* TO 'localhelp_app'@'localhost';
FLUSH PRIVILEGES;If the site reports that the database was not found, run database/database.sql before starting Tomcat. If it reports authentication failed, verify that the variables are visible to the Tomcat process rather than only to a different terminal.
src/com/localhelp: servlet, filter, and utility codeWebContent: JSP views, CSS, deployment descriptor, and Connector/Jdatabase/database.sql: schema, indexes, categories, and administrator setup notesbuild.bat: compiles Java sources intoWebContent\WEB-INF\classesdeploy.bat: builds, copies the application to Tomcat, and starts Tomcat
The application is deployed at http://localhost:8080/LocalHelp/.