Advanced Java - BCS613D
Assignment 2
Module 4 and Module 5
1. Write a java servlet which reads two parameters from the webpage, say
value 1 and value 2, which are type integer and finds the sum of the two
value and return back the result as a webpage
2. Provide java syntax for the following:
i) Handling HTTP requests and responses
ii) Using cookies
iii) Session tracking.
3.What is cookie list out methods defined by cookie. Write a servlet program
to read cookie.
4. Write a jsp program to add cookie name “User Id” and value”JB007”
5. Department has set the grade for the subject Java as follows:
Above 90: A, 80 - 89: B , 70 -79 : C Below 70 = fail.
Sham enters his marks for the subject Java in the interface provided.
Write a JSP program to accept the mark and display the grade.
6. Write a program to display current content of table in database.
7. Exceptions handling with jdbc program.
8. Explain the various steps of the JDBC process with code snippets
9. Briefly explain the callable statement object. Write program to call a
stored procedure
10. Explain the with an example Scrollable Result Set