Team Role: Jayesh Sharma — Member 4 (Backend Developer 2)
Layer: Controller & Business Logic Layer (MVC Architecture)
Technologies: Java EE Servlets, Java Business Logic, Expression Parsing, CSV Streaming (RFC 4180), Request Dispatching
This module implements the server-side business logic and controllers for the academic core of the portal: the dynamic experiments system, theory publishing workflows, the student feedback pipeline, employee CRUD desk, and mathematical computation engines.
- Dynamic Experiment Hub Controller:
ExperimentServlet.java: Loads the ordered catalog of built-in and teacher-added experiments fromExperimentDAO. Processes teacher submissions for new experiments and persists them.
- Employee Registration Desk CRUD Controller (Experiment 5):
EmployeeServlet.java: Controller for Experiment 5. Processes CRUD requests (save,search,update,delete,clean). Validates employee IDs and contact numbers, delegates persistence toEmployeeDAO.java, and sets structured status messages and model attributes forexp5.jsp.
- Role-Based Feedback Pipeline & Data Streaming:
FeedbackServlet.java: Overhauled controller managing Experiment 10.- Action
exp10_login: Authenticates users and registers session withActiveSessionManager. - Action
exp10_register: Dispatches student self-registration. - Action
exp10_logout: Terminates session and cleans up active device registry. - Action
submit: Accepts student feedback (subject, faculty name, rating, text), validates constraints, persists viaFeedbackDAO, and redirects student to confirmation view without exposing peer records. - Action
list: Teacher-only action retrieving filtered feedback records based on faculty, course, and rating. - Action
exportCsv: Direct server-side streaming of RFC 4180 compliant CSV reports withContent-Disposition: attachment; filename=feedback_report.csvand MIME typetext/csvfor instant Excel analysis.
- Action
- Theory & Study Content Controller:
TheoryServlet.java: Handles retrieval of published theory notes for all users, as well as teacher-only note publishing and deletion actions throughTheoryContentDAO.
- MVC Architecture Implementation (Experiment 3):
CalculatorModel.java: Core business model that parses mathematical expressions, handles operator precedence, validates input strings, and computes results.CalculatorServlet.java: Controller that accepts calculation requests fromexp3.jsp, delegates computation toCalculatorModel, attaches result models to the request scope, and forwards to the view.
- Arithmetic Processing (Experiment 8):
ArithmeticServlet.java: Backend servlet handling arithmetic calculations (+,-,*,/) with defensive numeric parsing and division-by-zero checks.
| File Path | Description |
|---|---|
src/main/java/com/javalab/servlet/ExperimentServlet.java |
Controller managing lab experiment listings and custom experiment registration |
src/main/java/com/javalab/servlet/EmployeeServlet.java |
Controller handling Employee CRUD operations (save, search, update, delete, clean) |
src/main/java/com/javalab/servlet/FeedbackServlet.java |
Controller handling role-based feedback actions, student submission, and CSV streaming |
src/main/java/com/javalab/servlet/TheoryServlet.java |
Controller managing retrieval, publishing, and removal of theory content |
src/main/java/com/javalab/servlet/CalculatorServlet.java |
MVC Controller routing calculations between JSP view and Calculator model |
src/main/java/com/javalab/servlet/ArithmeticServlet.java |
Controller processing arithmetic operations with defensive division-by-zero validation |
src/main/java/com/javalab/calc/CalculatorModel.java |
Pure Java business logic model performing mathematical expression evaluation |
- Integration with Member 1 & 2 (Frontend Views):
- Consumes requests from
exp3.jsp,exp5.jsp,arithmetic.jsp,theoryList.jsp,feedback.jsp, andfeedbackList.jsp, forwarding computed attributes back to the view layer.
- Consumes requests from
- Integration with Member 5 (Database Persistence):
- Persists and queries lab data via
ExperimentDAO.java,EmployeeDAO.java,TheoryContentDAO.java, andFeedbackDAO.java.
- Persists and queries lab data via
- Streamed Binary / Text Exporting:
- Implemented direct servlet-to-browser CSV streaming using proper RFC 4180 escaping and HTTP headers, enabling high-performance export without server memory bloat.
- Complete Employee CRUD Controller:
- Standardized CRUD lifecycle operations with transactional validation, parameterized queries, and clean view dispatching.
- Strict MVC Decoupling & Component Lifecycle:
- Separated user interface templates (
exp3.jsp), request routing (CalculatorServlet.java), and computational algorithms (CalculatorModel.java), demonstrating classic 3-tier MVC architecture.
- Separated user interface templates (