labPrograms_AdvanceJava_BCA5sem_2024[1]
labPrograms_AdvanceJava_BCA5sem_2024[1]
Create a simple Java program to connect to MySQL or Oracle DB and perform the below operations,
● Create a student table with columns USN (primary key), FN, LN, email, Phone, City, State, and
Pincode
● Insert at least 5 rows into the student table
● use the statement interface,
● perform necessary validation for data duplicity and constraint violations
● Retrieve student information from DB using USN as key.
● If USN is not present, show an appropriate message
Create a simple Java program to connect to MySQL or Oracle DB and perform the below operations.
Create a Java program for a Library Management System to connect to a MySQL or Oracle database and
perform the following operations:
● Create a Books table with columns: Book_ID (Primary Key), Title, Author, Genre, Publisher, Year,
and ISBN (Unique).
● Insert at least 10 records into the Books table using PreparedStatement, ensuring validation to
prevent duplicate ISBN entries and invalid values.
● Retrieve book details by Book_ID or Title, with scrollable navigation (forward/backward),
displaying an appropriate message if no data is found.
● (4) Optionally, list books of a specific genre, sorted by publication year.
Program 4 - Servlets Dynamic page rendering
Create a simple servlet which extends the httpServlet class and perform the below operations.
● Create a simple html file which takes name and USN as input, along with submit button
● Upon Submission ,servlet will be invoked, which would receive the request
● and read request parameters and send the data read as a response back to the browser.
Create a simple servlet which extends the httpServlet class and perform the below operations.
● Create a simple html file which takes 3 inputs from user along with submit button
o 1st text Input - Integer value
o 2nd text Input - Integer value
o 3rd Radio button Input - Operation(Add , Subtract , Divide)
● Upon submission, the servlet will be invoked, and the request parameters will be received.
Perform appropriate operation, and send back to the user with the response
● response would contain input values along with the result
● If no data is present, show an appropriate message
● Perform necessary data validation on input values and show an appropriate message
Create a simple servlet that extends the httpServlet class and performs the below operations.
● Create a simple html file that takes student USN(primary key), FN, LN, email, Phone, City, State,
and pincode as input, along with the submit button
● Upon Submission, the servlet will be invoked, which will receive the request
● Read request parameters, save the data into DB,
● If no data is present, show an appropriate message
● Perform necessary data validation on input values and show an appropriate message.
Demonstrate Session Management in Servlets using cookies - use the below input
● Create a minimum 2 servlets to add cookies and retrieve cookies respectively with an
appropriate response
● Create a simple html file that takes userName as input from the user
● along with the submit button
● Upon submission, userName will be read by FirstServlet, create and add a cookie object to the
response
● also generate a response which would contain form submission for secondServlet along with
submit button
● Upon submission, the second servlet would receive the cookie object from the browser and
● display the data retrieved from cookie as a response from secondServlet
Program 8 - Servlets: session Mgmt using Hidden Form fields
Demonstrate Session Management in Servlets using Hidden Form fields - use the below input
Demonstrate Session Management in Servlets using Hidden Form fields - use the below input
Demonstrate Session Management in Servlets using HTTP Session - use the below input
● Create a minimum 2 servlets to add session and retrieve sessions respectively with appropriate
response
● Create a simple html file that takes userName as input from the user along with the submit
button
● Upon submission, userName will be read by FirstServlet and create and add session object to
response
● also generate a response which would contain form submission for secondServlet along with the
submit button
● Upon submission, the second servlet would receive the session object from the browser and
● display the data retrieved from the session as a response from secondServlet
● also display session creation and last access time of the session
Program 15 – SpringFrameWork - DI