A comprehensive web-based College Management System built with Java, JSP, and MySQL for managing student information, administrative tasks, staff coordination, and user interactions.
- Project Overview
- Features
- System Architecture
- Technology Stack
- Prerequisites
- Installation Guide
- Database Setup
- Running the Application
- Project Structure
- User Roles & Modules
- Configuration
- API & Page Routing
- Security Considerations
- Troubleshooting
- Future Enhancements
- Contributing
- License
- Author
The College Management System is a full-stack web application designed to streamline college administrative operations. It provides a centralized platform for:
- Administrative Management: Dashboard, notifications, enquiries, and registration/login management
- User Management: Profile management, password changes, feedback, and access control
- Staff Coordination: Timetable management, student activity tracking, profile updates
- Student Portal: Leave applications, academic information, grades, and profile management
- General Information: About college, departments, faculty, gallery, contact information
The system implements a role-based access control (RBAC) system with multiple user types: Admin, Staff, Student, and General Users.
- Secure login system with user role-based access
- User type differentiation (Admin, User, Staff, Student)
- Session management
- Logout functionality
- User registration with validation
- Profile management for all user types
- Password change functionality
- User dashboard with personalized content
- Feedback submission system
- Dashboard with overview statistics
- Enquiry management (View/Update enquiries)
- Notification management
- Registration and login logs
- User activity tracking
- Feedback management
- Staff dashboard
- Timetable management
- Student activity monitoring
- Leave request management
- Profile management
- Student dashboard
- Leave application submission
- Academic information access
- Timetable view
- Profile and password management
- Institution information (About Us, Contact Us)
- Department information (CSE, EE, ELX branches)
- Faculty listings
- Image gallery
- Grievance portal
- Public registration
┌─────────────────────────────────────┐
│ Client Layer (Browser) │
│ HTML5 | CSS3 | Bootstrap | jQuery │
└─────────────┬───────────────────────┘
│
┌─────────────▼───────────────────────┐
│ Presentation Layer (JSP) │
│ - AdminZone/ │
│ - UserZone/ │
│ - StaffZone/ │
│ - StudentZone/ │
│ - General-master/ │
└─────────────┬───────────────────────┘
│
┌─────────────▼───────────────────────┐
│ Business Logic Layer (Java) │
│ - Session Management │
│ - Role-based Routing │
│ - Request Processing │
└─────────────┬───────────────────────┘
│
┌─────────────▼───────────────────────┐
│ Data Access Layer (JDBC) │
│ - Databasemanager.java │
│ - Connection Pooling (Manual) │
└─────────────┬───────────────────────┘
│
┌─────────────▼───────────────────────┐
│ Database Layer (MySQL) │
│ - vt21java (Default Database) │
│ - Multiple Tables │
└─────────────────────────────────────┘
- Language: Java 1.8
- Build Tool: Apache ANT
- IDE: NetBeans IDE
- Server: Apache Tomcat 7+ (Java EE compliant)
- Servlet/JSP: Java EE 1.7
- Markup: HTML5
- Styling: Bootstrap 3.x, CSS3, Font Awesome
- Scripting: jQuery 2.1.0+, jQuery 3.3.1+
- Responsive Design: Mobile-friendly layouts
- DBMS: MySQL 5.x+
- Driver: MySQL JDBC 5.1.5
- Connection: Direct JDBC (Manual Connection Management)
- Application Server: Apache Tomcat 7.0+
- Protocol: HTTP/HTTPS
Before installing the system, ensure you have the following:
- OS: Windows, Linux, or macOS
- RAM: Minimum 2GB (4GB recommended)
- Disk Space: 500MB for installation
-
Java Development Kit (JDK)
- Version: JDK 8 or higher
- Download: https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html
-
Apache Tomcat
- Version: 7.0 or higher (9.x recommended)
- Download: https://tomcat.apache.org/download-70.cgi
-
MySQL Server
- Version: 5.5 or higher (5.7+ recommended)
- Download: https://dev.mysql.com/downloads/mysql/
-
NetBeans IDE (Optional)
- Version: 8.0 or higher
- Download: https://netbeans.apache.org/download/
-
Git (For version control)
- Download: https://git-scm.com/
JAVA_HOME = C:\Program Files\Java\jdk1.8.0_xxx
TOMCAT_HOME = C:\Program Files\Apache Software Foundation\Tomcat 9.0
git clone https://github.com/yourusername/college-management-system.git
cd college-management-system- Download and install JDK 8 or higher
- Set JAVA_HOME environment variable
- Verify installation:
java -version javac -version
- Download Apache Tomcat 9.x
- Extract to a directory (e.g.,
C:\Program Files\Tomcat9) - Set TOMCAT_HOME environment variable
- (Optional) For NetBeans: Configure Tomcat in NetBeans IDE
- Download and install MySQL Community Server
- Start MySQL service:
- Windows:
net start MySQL80(or your version) - Linux:
sudo service mysql start - macOS:
brew services start mysql
- Windows:
- Verify installation:
mysql --version
mysql -u root -pCreate the database and tables (see Database Setup section)
cd college-management-system
ant clean build- Open the project in NetBeans
- Right-click project → Clean and Build
CREATE DATABASE IF NOT EXISTS vt21java CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE vt21java;CREATE TABLE tbl_login (
id INT AUTO_INCREMENT PRIMARY KEY,
userid VARCHAR(100) UNIQUE NOT NULL,
pass VARCHAR(255) NOT NULL,
utype VARCHAR(50) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);CREATE TABLE tbl_user_profile (
id INT AUTO_INCREMENT PRIMARY KEY,
userid VARCHAR(100) UNIQUE NOT NULL,
name VARCHAR(150),
email VARCHAR(100),
phone VARCHAR(20),
address TEXT,
city VARCHAR(50),
state VARCHAR(50),
zip_code VARCHAR(10),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
FOREIGN KEY (userid) REFERENCES tbl_login(userid) ON DELETE CASCADE
);CREATE TABLE tbl_enquiry (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(150) NOT NULL,
email VARCHAR(100),
phone VARCHAR(20),
message TEXT,
status VARCHAR(50) DEFAULT 'New',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);CREATE TABLE tbl_notification (
id INT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(255) NOT NULL,
description TEXT,
notification_date DATE,
created_by VARCHAR(100),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);CREATE TABLE tbl_feedback (
id INT AUTO_INCREMENT PRIMARY KEY,
userid VARCHAR(100),
feedback TEXT,
rating INT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (userid) REFERENCES tbl_login(userid) ON DELETE SET NULL
);CREATE TABLE tbl_student (
id INT AUTO_INCREMENT PRIMARY KEY,
userid VARCHAR(100) UNIQUE,
name VARCHAR(150),
roll_no VARCHAR(20),
branch VARCHAR(50),
semester INT,
email VARCHAR(100),
phone VARCHAR(20),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (userid) REFERENCES tbl_login(userid) ON DELETE CASCADE
);CREATE TABLE tbl_staff (
id INT AUTO_INCREMENT PRIMARY KEY,
userid VARCHAR(100) UNIQUE,
name VARCHAR(150),
emp_id VARCHAR(20),
department VARCHAR(100),
email VARCHAR(100),
phone VARCHAR(20),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (userid) REFERENCES tbl_login(userid) ON DELETE CASCADE
);CREATE TABLE tbl_leave (
id INT AUTO_INCREMENT PRIMARY KEY,
userid VARCHAR(100),
from_date DATE,
to_date DATE,
reason TEXT,
status VARCHAR(50) DEFAULT 'Pending',
applied_on TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (userid) REFERENCES tbl_login(userid) ON DELETE CASCADE
);CREATE TABLE tbl_timetable (
id INT AUTO_INCREMENT PRIMARY KEY,
branch VARCHAR(50),
semester INT,
day VARCHAR(20),
subject VARCHAR(100),
time_from TIME,
time_to TIME,
room_no VARCHAR(20),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);-- Admin User
INSERT INTO tbl_login (userid, pass, utype) VALUES ('admin', 'admin123', 'admin');
-- Sample User
INSERT INTO tbl_login (userid, pass, utype) VALUES ('user@college.com', 'user123', 'user');
-- Sample Student
INSERT INTO tbl_login (userid, pass, utype) VALUES ('student@college.com', 'student123', 'student');
-- Sample Staff
INSERT INTO tbl_login (userid, pass, utype) VALUES ('staff@college.com', 'staff123', 'staff');- Open NetBeans IDE
- File → Open Project → Navigate to college-management-system folder
- Right-click project → Run
- Application will open at:
http://localhost:8080/collegep
# Build the project
ant build
# Create WAR file
ant jar
# Deploy to Tomcat manually:
# Copy the dist/collegep.war to TOMCAT_HOME/webapps/- Build the project:
ant build - Generate WAR file:
ant jar - Open Tomcat Manager: http://localhost:8080/manager/html
- Deploy the WAR file from
dist/collegep.war
URL: http://localhost:8080/collegep/
Default Credentials:
-
Admin:
- Email:
admin - Password:
admin123
- Email:
-
User:
- Email:
user@college.com - Password:
user123
- Email:
college-management-system/
├── build.xml # ANT build configuration
├── README.md # Project documentation
├── .gitignore # Git ignore file
│
├── src/
│ ├── java/
│ │ └── Mypack/
│ │ └── Databasemanager.java # Database operations
│ └── conf/
│ └── MANIFEST.MF
│
├── web/ # Web root
│ ├── index.html # Home page
│ ├── css/
│ │ ├── bootstrap.min.css
│ │ ├── bootstrap-theme.min.css
│ │ ├── font-awesome.min.css
│ │ ├── hover.css
│ │ └── akash.css # Custom styles
│ │
│ ├── js/
│ │ ├── jquery-2.1.0.min.js
│ │ ├── jquery-3.3.1.min.js
│ │ ├── bootstrap.min.js
│ │ └── akash.js # Custom scripts
│ │
│ ├── fonts/ # Font files for Font Awesome
│ ├── Images/ # Image assets
│ │
│ ├── AdminZone/ # Admin module
│ │ ├── Dashboard.jsp
│ │ ├── ViewEnquiry.jsp
│ │ ├── Upenquiry.jsp
│ │ ├── AddNotification.jsp
│ │ ├── viewRegistration.jsp
│ │ ├── viewlogin.jsp
│ │ ├── viewfeedback.jsp
│ │ ├── changepassword.jsp
│ │ ├── logout.jsp
│ │ ├── Adminheader.jsp
│ │ └── Adminfooter.jsp
│ │
│ ├── UserZone/ # User module
│ │ ├── Dashboard.jsp
│ │ ├── myprofile.jsp
│ │ ├── feedback.jsp
│ │ ├── changepassword.jsp
│ │ ├── logout.jsp
│ │ ├── Userheader.jsp
│ │ └── Userfooter.jsp
│ │
│ ├── StaffZone/ # Staff module
│ │ ├── TimeTable.jsp
│ │ ├── StudentActivity.jsp
│ │ ├── Profile.jsp
│ │ ├── ChangePassword.jsp
│ │ ├── Logout.jsp
│ │ ├── StaffHeader.jsp
│ │ └── StaffFooter.jsp
│ │
│ ├── StudentZone/ # Student module
│ │ ├── profile.jsp
│ │ ├── leave.jsp
│ │ ├── changepassword.jsp
│ │ ├── logout.jsp
│ │ └── Studentheader.jsp
│ │
│ ├── General-master/ # Public pages
│ │ ├── Login.jsp
│ │ ├── Registration.jsp
│ │ ├── Aboutus.jsp
│ │ ├── Contactus.jsp
│ │ ├── Departmentc.jsp # Computer Science
│ │ ├── Departmentee.jsp # Electrical Engineering
│ │ ├── Departmentelx.jsp # Electronics
│ │ ├── Faculty.jsp
│ │ ├── Gallery.jsp
│ │ ├── Grievance-Portal.jsp
│ │ ├── header.jsp
│ │ └── footer.jsp
│ │
│ └── META-INF/
│ └── context.xml # Tomcat context configuration
│
├── nbproject/ # NetBeans configuration
│ ├── project.properties
│ ├── project.xml
│ ├── build-impl.xml
│ ├── ant-deploy.xml
│ └── private/
│
├── build/ # Build output (generated)
│ ├── web/
│ └── generated/
│
├── dist/ # Distribution (generated WAR file)
│ └── collegep.war
│
└── .git/ # Git version control
Logged in as: Admin user
Modules:
- Dashboard: Overview statistics and quick links
- View Enquiry: View and manage user enquiries
- Update Enquiry: Change enquiry status
- Add Notification: Post notifications to the system
- View Registration: Monitor new registrations
- View Login Logs: Track user login activities
- View Feedback: Review user feedback
- Change Password: Update admin password
- Logout: End admin session
Access Level: Full system access
Logged in as: Regular user
Modules:
- Dashboard: User home with quick stats
- My Profile: View and edit profile information
- Submit Feedback: Provide system feedback
- Change Password: Update user password
- Logout: End user session
Access Level: Limited to user features and profile
Logged in as: Staff/Faculty member
Modules:
- Dashboard: Staff overview
- View Timetable: Class schedule management
- Student Activity: Monitor student attendance/activities
- My Profile: View and manage staff profile
- Change Password: Update staff password
- Logout: End staff session
Access Level: Staff-specific features
Logged in as: Student user
Modules:
- Dashboard: Student home
- My Profile: Student academic information
- Apply Leave: Submit leave requests
- Change Password: Update password
- Logout: End student session
Access Level: Student-specific features
Access: Public (No login required)
Modules:
- Home: Landing page
- About Us: College information
- Contact Us: Contact form and details
- Departments: Information about CSE, EE, ELX branches
- Faculty: Faculty listings
- Gallery: Photo gallery
- Grievance Portal: Submit complaints/grievances
- Login: User login page
- Registration: New user registration
- Footer: Navigation and links
Access Level: Public access
Edit src/java/Mypack/Databasemanager.java:
// Database Connection Details
String host = "localhost"; // MySQL host
String port = "3306"; // MySQL port
String database = "vt21java"; // Database name
String username = "root"; // MySQL username
String password = ""; // MySQL password (leave empty if no password)
String url = "jdbc:mysql://" + host + ":" + port + "/" + database;Current Configuration:
URL: jdbc:mysql://localhost:3306/vt21java
Username: root
Password: (empty)
Driver: com.mysql.jdbc.Driver
Edit web/META-INF/context.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path="/collegep"/>path: URL path for application (http://localhost:8080/collegep)
Edit nbproject/project.properties:
j2ee.platform=1.7-web
j2ee.server.type=Tomcat
javac.source=1.8
javac.target=1.8
| Endpoint | Method | Purpose |
|---|---|---|
/collegep/General-master/Login.jsp |
GET/POST | User login page |
/collegep/General-master/Registration.jsp |
GET/POST | User registration |
UserZone/logout.jsp |
GET | User logout |
AdminZone/logout.jsp |
GET | Admin logout |
| URL | Module | Description |
|---|---|---|
/collegep/ |
index.html | Home page |
/collegep/General-master/Aboutus.jsp |
About | College information |
/collegep/General-master/Contactus.jsp |
Contact | Contact form |
/collegep/General-master/Faculty.jsp |
Faculty | Faculty list |
/collegep/General-master/Gallery.jsp |
Gallery | Photo gallery |
/collegep/General-master/Grievance-Portal.jsp |
Grievance | File grievance |
/collegep/General-master/Departmentc.jsp |
Department | CSE details |
/collegep/General-master/Departmentee.jsp |
Department | EE details |
/collegep/General-master/Departmentelx.jsp |
Department | ELX details |
| URL | Purpose |
|---|---|
/collegep/AdminZone/Dashboard.jsp |
Admin dashboard |
/collegep/AdminZone/ViewEnquiry.jsp |
View enquiries |
/collegep/AdminZone/Upenquiry.jsp |
Update enquiries |
/collegep/AdminZone/AddNotification.jsp |
Add notifications |
/collegep/AdminZone/viewRegistration.jsp |
View registrations |
/collegep/AdminZone/viewlogin.jsp |
View login logs |
/collegep/AdminZone/viewfeedback.jsp |
View feedback |
/collegep/AdminZone/changepassword.jsp |
Change password |
| URL | Purpose |
|---|---|
/collegep/UserZone/Dashboard.jsp |
User dashboard |
/collegep/UserZone/myprofile.jsp |
User profile |
/collegep/UserZone/feedback.jsp |
Submit feedback |
/collegep/UserZone/changepassword.jsp |
Change password |
| URL | Purpose |
|---|---|
/collegep/StaffZone/TimeTable.jsp |
View timetable |
/collegep/StaffZone/StudentActivity.jsp |
Student activity |
/collegep/StaffZone/Profile.jsp |
Staff profile |
| URL | Purpose |
|---|---|
/collegep/StudentZone/profile.jsp |
Student profile |
/collegep/StudentZone/leave.jsp |
Apply for leave |
-
SQL Injection Vulnerability
- Current: Direct string concatenation in SQL queries
- Risk: HIGH - Database can be compromised
- Example:
"select * from tbl_login where userid='"+userid+"'"
-
Plain Text Passwords
- Current: Passwords stored without encryption
- Risk: HIGH - If database is breached, all passwords are exposed
- Recommendation: Use BCrypt or Argon2
-
No Input Validation
- User inputs not validated before database operations
- Risk: HIGH - XSS and SQL injection attacks possible
-
Session Management Issues
- Weak session validation
- No timeout mechanism
- Risk: MEDIUM - Session hijacking possible
-
Hardcoded Database Credentials
- Credentials visible in source code
- Risk: MEDIUM - If code is public, credentials are exposed
-
Old MySQL Driver
- MySQL JDBC 5.1.5 is outdated
- Risk: MEDIUM - Security patches not applied
// 1. Use Prepared Statements (SQL Injection Prevention)
String query = "SELECT * FROM tbl_login WHERE userid = ? AND pass = ?";
PreparedStatement stmt = connection.prepareStatement(query);
stmt.setString(1, userid);
stmt.setString(2, password);
// 2. Use Password Hashing
import org.mindrot.bcrypt.BCrypt;
String hashedPassword = BCrypt.hashpw(password, BCrypt.gensalt());
// 3. Input Validation
public static boolean isValidEmail(String email) {
return email.matches("^[A-Za-z0-9+_.-]+@(.+)$");
}
// 4. Session Timeout
session.setMaxInactiveInterval(15 * 60); // 15 minutes
// 5. Use Environment Variables for Credentials
String dbUrl = System.getenv("DB_URL");
String dbUser = System.getenv("DB_USER");
String dbPass = System.getenv("DB_PASSWORD");- CRITICAL: Implement prepared statements (Fix SQL Injection)
- CRITICAL: Hash passwords with BCrypt
- HIGH: Add input validation
- HIGH: Use environment variables for credentials
- MEDIUM: Upgrade MySQL JDBC driver
- MEDIUM: Implement proper session management
- LOW: Add CSRF tokens
- LOW: Implement HTTPS/SSL
Solution:
- Check MySQL is running:
# Windows net start MySQL80 # Linux sudo systemctl start mysql
- Verify credentials in
Databasemanager.java - Check database exists:
SHOW DATABASES; - Ensure MySQL JDBC driver is in classpath
Solution:
- Check if WAR is deployed in Tomcat
- Verify context path in
context.xml - Check Tomcat logs in
TOMCAT_HOME/logs/ - Rebuild and redeploy:
ant clean build jar
Solution:
- Ensure JDK 1.8+ is installed
- Check
JAVA_HOMEenvironment variable - Verify all dependencies are in classpath
- Clean and rebuild:
ant clean build
Solution:
- Check JSP syntax errors
- Verify all included files exist (using
<%@ include %>) - Check Tomcat compiler settings
- Review Tomcat logs for compilation errors
Solution:
- Check
session.setMaxInactiveInterval()in JSP files - Ensure cookies are enabled in browser
- Check browser privacy settings
- Review Tomcat session manager configuration
- Implement prepared statements for all SQL queries
- Add BCrypt password hashing
- Add input validation and sanitization
- Implement CSRF tokens
- Use environment variables for configuration
- Upgrade MySQL JDBC driver to 8.x
- Email verification for registration
- Password reset via email
- Two-factor authentication (2FA)
- User role management
- Audit logging for admin actions
- Dashboard statistics and analytics
- Online examination module
- Result management system
- Attendance tracking system
- Fee management module
- Hostel management module
- Library management module
- Convert to Spring Boot framework
- Implement RESTful APIs
- Add Docker containerization
- CI/CD pipeline (GitHub Actions/Jenkins)
- Database connection pooling (HikariCP)
- Redis caching layer
- Elasticsearch for search functionality
- Modernize UI with React/Angular
- Mobile app (Android/iOS)
- Dark theme support
- Accessibility improvements (WCAG 2.1)
- Progressive Web App (PWA)
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Commit changes:
git commit -m 'Add feature' - Push to branch:
git push origin feature/your-feature - Submit a Pull Request
- Follow Java naming conventions
- Add comments for complex logic
- Test changes before submitting PR
- Update README for new features
- Maintain backward compatibility
This project is licensed under the MIT License - see the LICENSE file for details.
Original Author: Adarsh Kumar Mishra
Contact:
- Email: akmsdr2019@gmail.com
- GitHub: https://github.com/Adarsh09675
- Enhanced documentation
- Added comprehensive README
- Identified security issues
- Added database schema
- Added troubleshooting guide
- Added future roadmap
- Basic college management system
- Admin, User, Staff, Student zones
- JSP-based frontend
- MySQL backend
For issues, questions, or suggestions:
- Check this README documentation
- Search existing GitHub issues
- Create a new GitHub issue with:
- Clear title and description
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
- System information
- Java EE Documentation
- Apache Tomcat Documentation
- MySQL Documentation
- Bootstrap Documentation
- jQuery Documentation