Professional Documents
Culture Documents
00
Contents
01
Case Study
Number
Requirement/Task
CS1
1) Create a Student class consisting of the following attributes and
appropriate getter setter methods to access those attributes
a) Id (String)
b) name(String)
c) subject(String)
d) score(int)
2) Make Sure Student class implements java.io.Serializable interface.
3) Write a program to create 3 Student objects and store it in an ArrayList
structure.
4) Write a method to traverse the ArrayList created in step 3 and print the
contents of that array list.
Time
30 min.
S/W Required
Case Study
Number
Requirement/Task
CS2
1) Create following two tables in the given database(DB2/DERBY)
a) STUDENT_DETAIL (STUDENT_ID VARCHAR(6), NAME VARCHAR(30),
SUBJECT VARCHAR(30), SCORE INTEGER) - PK(STUDENT_ID).
b) USER_DETAIL (USER_ID VARCHAR(6),PASSWD VARCHAR(8))
PK(USER_ID).
c) Insert some records in the above tables.
2)
Time
60 minutes
S/W Required
03
Case Study
Number
Requirement/Task
CS3
1) Create a DB Enabled Web Application comprising of a single servlet.
2) Setup a JNDI Data Source pointing to the database created earlier in
Case Study CS2 & CS1.
3) Implement the servlet in a way such that it can fetch the list of students
from the table (using JNDI Data connection) and print it in the browser
in a tabular format when the application url(application context specific
servlet url) is invoked with a HTTP GET request.
Time
60 minutes
S/W Required
04
Case Study
Number
Requirement/Task
CS4
1) Create a DB Enabled Web Application comprising of a single JSP login
page and one servlet.
2) User needs to provide the login credentials (userid, password) in the
login page and hit submit for the validation.
3) On receiving the request the servlet page will invoke a UserDAO class to
validate the given credentials.
4) Successful validation will show a greeting message to the user, otherwise
it will show one Invalid User/Password message and ask the user to
enter the credentials again.
Hints Reuse the DAO Classes, JNDI configuration, DB setup as created
in earlier case studies.
Time
60 minutes
S/W Required
05
Case Study
Number
Requirement/Task
CS5
1) Create a DB Enabled Web Application comprising of three JSP pages and
one controller servlet
a) Login.jsp.
b) Welcome.jsp
c) StudentDetails.jsp (Use JSTL tags accordingly)
d) MainServlet.
2) The application will accept the login credentials from the user and on
success it will redirect the response to a welcome page containing one
greeting message and one link to the StudentDetails page.
3) Clicking on the StudentDetails link will fetch all the student records from
the STUDENT_DETAILS table and print the list in the browser.
Hints
i)
Use the MainServlet as the controller class which will accept
HTTP requests from the JSP page and redirect the response
accordingly.
ii)
ReUse StudentDAO & UserDAO from Case Study CS1.
iii)
Reuse the DB & Server configuration from CS2 & CS3.
Time
60 minutes
S/W Required