Question

Write a program using JSP and JDBC to support editing (address modification, mobile number/ email id update) of MCA 1st Semester students of IGNOU. The program should take enrollment number or registered mobile number as input. Make necessary assumptions required

19 Apr 2025
Answer :
Word Count : 431
To develop a JSP and JDBC-based program for editing the details of MCA 1st Semester students of IGNOU, first, a database table `MCA1_Students` can be assumed with columns `EnrollmentNo`, `Name`, `Address`, `MobileNo`, and `EmailId`. The program will take `EnrollmentNo` or `MobileNo` as input to fetch and update the student's record. JDBC will be used for database connectivity, and JSP will handle the frontend for input and updating. The database connection can be established using a JDBC driver. Assuming MySQL, the connection setup in JSP would look like: ```java <%@ page import="java.sql.*" %> <% String url = "jdbc:mysql://localhost:3306/ignou_db"; String user = "root"; String password = "root"; Connection con = null; Statement stmt = null; ResultSet rs = null; try { Class.forName("com.mysql.cj.jdbc.Driver"); con = DriverManager.getConnection(url, user, password); } catch(Exception e) { out.println("Database connection error: " + e.getMessage()); } %> ``` The input form for searching a student by enrollment number or mobile number can be created in JSP: ```html
Enter Enrollment No or Mobile No: _____ ______ ______ ____ __________ __________ __________.
____ ___ _________ ______ ______ ______.
____ __________ _________ _______ ______ ___ _________.
____ ______ ______ ___ _________ ______ ______ ______ ________ _________ ______ ______.
____ __________ _______ ___ _____ _______ _________ _____ _________.
_________ ________ _____ _______ ____.
_________ _________ _____ ________ _____ ___ _______.
_______ ___ ____ ____ __________ _______ __________ ________ _______.
____ __________ _______ ____ ________ ________ ______ __________ _____ ___ __________.
_____ __________ __________ ___ ___ ___ __________ ______ _____.
______ ___ _____ _________ _________ ___ ________ _________.
_____ ________ _____ ______ ___ ________ ______ ________ __________ _______ ___.
________ __________ ____ __________ _____ ____ _________ __________ ___ ______.
_____ ____ ________ ___ ___ ____ _______ __________ _________ ___.
_________ _________ _______ ____ ____ ________.
______ _________ _________ _________ __________ __________ __________ _________ _____ ____ ________ _________.
_______ ______ ___ __________ ________ _____.
_________ _______ ___ ______ __________ ______ _____ ________ ___ ______.
________ ________ _________ ___ _____ _________ ______ _____ ______.
________ ________ ____ ______ _____ _____.
______ ____ ____ _______ _________ ________.
_____ ____ _________ ________ _________ ____ _________ ____ ____.
_______ ______ ___ ___ _______ __________ __________ ______ _________.
_____ ______ ________ ________ ________ ___ ________ _______ ______ ______ _________ ___.
______ _____ ________ _________ __________ _______ __________ ___ ____ ________ ______ __________.
______ _______ _________ ________ ___.
_______ _______ __________ _________ ________ ____ ____ _______ _________.
____ _________ ______ ________ ____.
__________ _______ _________ ________ __________ __________.
____ __________ ____ ___ _______ _____ _________ ________ ___ ___ ______ _________.
________ ___ __________ ______.
IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
Top