Skip to content

A random quiz generator built using java servlets and JDBC

crazy-coder-neel/RandomQuizGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🎯 Random Quiz Generator

A Java Servlet-based web application that dynamically generates random quizzes from a PostgreSQL database. The project is deployed on an Apache Tomcat server, demonstrating the integration of core Java EE components, JDBC for database operations, and a simple yet functional frontend to provide an interactive quiz experience.


πŸ“š Project Overview

This application allows users to take a randomly generated quiz consisting of multiple-choice questions. The backend logic is written using Java Servlets, which interact with a PostgreSQL database using JDBC to fetch and render questions dynamically. It's hosted on an Apache Tomcat server and is designed to be lightweight, fast, and modular for easy extension.


πŸš€ Features

  • 🎲 Randomly generated quiz from the database each time
  • πŸ–₯️ Built with standard Java EE (Servlets, JSP)
  • πŸ› οΈ Hosted on Apache Tomcat server
  • πŸ“‹ Retrieves quiz questions using SQL with ORDER BY RANDOM()
  • βœ… Automatic answer checking and score display
  • πŸ’Ύ PostgreSQL backend with JDBC connectivity
  • 🌍 Fully functional on local or deployed server

🧰 Technologies Used

Component Technology
Backend Java Servlets (J2EE)
Frontend HTML, CSS, JSP
Database PostgreSQL
Server Apache Tomcat
DB Connector JDBC Driver (PostgreSQL JDBC)
Build Tool Maven

βš™οΈ Setup Instructions βœ… Prerequisites

Java (JDK 8+) Apache Tomcat (v9 or v10 recommended) PostgreSQL Any Java IDE (Eclipse / IntelliJ) PostgreSQL JDBC Driver (add to lib/)


Configure JDBC in servlet : -String url = "jdbc:postgresql://localhost:5432/quizdb";

-String user = "your_username";

-String password = "your_password";

Connection conn = DriverManager.getConnection(url, user, password);


About

A random quiz generator built using java servlets and JDBC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages