A simple web-based quiz application built using Java, JSP, Servlets, and MySQL. The application allows students to take quizzes and view their results and leaderboard. An admin can log in to add questions.
Click here to view the repository
-
👨💻 Admin Panel
- 🔐 Login functionality for admin.
- ➕ Add quiz questions.
-
👩🎓 Student Interface
- 📝 Take quizzes without the need for login.
- 📊 View quiz results after completion.
- 🏆 View leaderboard with top scores.
-
🛠️ Technologies Used
- Frontend: HTML, CSS, JavaScript, JSP
- Backend: Java (Servlets, JSP)
- Database: MySQL
- Server: Apache Tomcat
- Build Tool: Maven
The project uses the following libraries, managed by Maven:
javax.servlet:javax.servlet-api- For Servlet support.javax.servlet.jsp:javax.servlet.jsp-api- For JSP pages.com.mysql:mysql-connector-j- For connecting with MySQL database.javax.servlet:jstl- For JSP Standard Tag Library support.
These are defined in the pom.xml.
-
Clone the repository
git clone https://github.com/Rohitswami16/OnlineQuizSystem.git
-
Import into your IDE
- Open the project in Eclipse or STS (Spring Tool Suite).
- Configure Apache Tomcat server.
-
Setup MySQL Database
- Create a database (e.g.,
OnlineQuizSystem_Database). - Create tables manually using the code provided.
- Create a database (e.g.,
-
Run the project
- Deploy the project on Tomcat.
- Open your browser and visit:
(http://localhost:8080/OnlineQuizSystem/)
quiz-project/
├── src/
│ └── main/
│ ├── java/
│ │ └── com/quiz/
│ │ ├── controller/ # Servlets handling requests
│ │ │ ├── AdminLoginController.java
│ │ │ ├── AdminPanelController.java
│ │ │ ├── HomeController.java
│ │ │ ├── LeaderboardController.java
│ │ │ ├── QuizController.java
│ │ │ └── ResultController.java
│ │ ├── dao/ # Data Access Objects for database interaction
│ │ │ ├── AdminDAO.java
│ │ │ ├── OptionDAO.java
│ │ │ ├── QuestionDAO.java
│ │ │ └── ResultDAO.java
│ │ ├── model/ # Java classes representing data models
│ │ │ ├── Admin.java
│ │ │ ├── Option.java
│ │ │ ├── Question.java
│ │ │ └── Results.java
│ │ └── util/ # Utility classes like DB connection
│ │ └── DBConnection.java
│ ├── resources/ # Configuration files
│ │ └── application.properties
│ └── webapp/ # Frontend files
│ ├── adminLogin.jsp
│ ├── adminPanel.jsp
│ ├── index.js
│ ├── index.jsp
│ ├── leaderboard.jsp
│ ├── style.css
│ └── takeQuiz.jsp
├── pom.xml # Maven build file
└── README.md
![]() Home |
![]() Admin Login |
![]() Add Question |
![]() Quiz |
![]() Result |
![]() Leaderboard |
Rohit Swami
GitHub: @Rohitswami16





