A Java Servlet + JSP web application for secure user registration and authentication with full input validation and session handling.
π Registration Form
- β Username β Only alphabetic characters allowed
- β UserID β Must be unique in the database
- β Email β Validated using Regex
- β Password & Confirm Password β Must match
- β Age β Between 18 and 80
π Login Form
- π Credentials verified against database records
- β Errors shown for invalid input using session messages
π Backend Features
- ποΈ DAO Layer for DB interaction
- π Session management with
HttpSession - π« Input validation and duplicate checking
- π‘ JDBC with MySQL
| Language / Tech | Purpose |
|---|---|
| Java (Servlets & JSP) | Backend logic |
| HTML, CSS, Bootstrap 5 | Frontend UI |
| JDBC | Database connectivity |
| MySQL | Persistent storage |
| Apache Tomcat | Servlet container |
index.jsp β Registration Page
login.jsp β Login Page
register.java β Servlet to handle register/login logic
UserDetails.java β DAO for DB operations
UserData.java β POJO (Entity class)
style.css β Custom CSS styles
β‘ Application Flow
π€ User registers with form input.
π‘οΈ Fields are validated (server-side).
ποΈ If valid β data saved in MySQL.
π« If UserID already exists β error via session message.
π On success β redirected to Login page.
π Login credentials are verified against DB.
β If valid β redirected to Home page with:
