0% found this document useful (0 votes)
18 views

Question Bank Unit-3

This document contains a question bank with 44 questions related to Java servlets. The questions cover servlet concepts like lifecycle, GET and POST methods, RequestDispatcher, filters, sessions, and examples using servlets with databases.

Uploaded by

Patel Honey
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Question Bank Unit-3

This document contains a question bank with 44 questions related to Java servlets. The questions cover servlet concepts like lifecycle, GET and POST methods, RequestDispatcher, filters, sessions, and examples using servlets with databases.

Uploaded by

Patel Honey
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Computer Engineering Department

Government Engineering College Dahod

Date: 15 Mar 2024

Advanced Java Programming


Question Bank Unit-3
1. What is Servlet? Explain the life cycle methods of it. (S2022, 4
OW2023, OW2020, OW2018)
2. Discuss Servlet life cycle methods. Explain role of web container. 4
(W2021)
3. List and Explain various stages of Servlet life cycle. (OS2019, 7
OW2019)
4. Differentiate between doGet() & doPost() methods. (OW2022) 3
5. Discuss the use of GET and POST method in servlet with code 4
snippet. (OS2022)
6. Differentiate between GenericServlet and HttpServlet. (OW2020, 3
OW2018)
7. Explain use of ServletConfig and ServletContext object with 4
example. (OS2018)
8. Differentiate ServletConfig and ServletContext objects. (S2023, 4
W2022, W2021, OS2023, OW2023, OS2022, OW2019, OW2018)
9. Explain Request and Response object in Servlet. (OW2022, 3
OW2019)
10. List out the important methods of HttpServletResponse. (W2022) 1
11. What is the function of a SessionFactory object? How will you obtain 2
such an object? (W2022)
12. List out classes of javax.servlet.http package. (OW2021) 3
13. List out interfaces of javax.servlet.http package. (OW2021) 3
14. What is a deployment descriptor file? Explain it with code for 4
Managing the different errors or exceptions. (OW2021)
15. Write and discuss web.xml file parameter. (OS2022, OS2018) 3
16. Differentiate attributes and parameters of servlet. (W2023) 4
17. Write servlet which displayed following information of client. 4
I. Client Browser
II. Client IP address
III. Client Port No
IV. Query String name and values (OS2022)
18. Demonstrate the use of ServletRequestDispacher and its methods 7
include and forward. (S2023, OS2021)
19. Explain the purpose of RequestDispatcher using the methods 4
forward () and include (). (S2023, OS2023)
20. What is Request Dispatcher? What is the difference between 7
RequestDispatcher’s forward() and include() method? Explain it in
detail with program. (W2021, OW2023, OW2022, OW2020,
OS2018)
21. What is Filter? List the applications of filter. (W2021, OW2020, 3
OW2018)
Computer Engineering Department
Government Engineering College Dahod

22. What is filter? List Different filter interfaces. (OW2022) 3


23. What is filter? How will you configure filter using deployment 4
descriptor? (S2023, S2022, W2022, OS2023, OS2018)
24. Explain the lifecycle of filter. (W2023) 3
25. What is FilterConfig? How will you use it? (S2023, W2022) 4
26. What is a session? List out various session management techniques. 3
(S2022, OW2023, OS2023, OS2022, OS2021)
27. Write working of session management in servlet. (OW2019) 3
28. What is Session Management in servlet? Write a servlet application 7
that demonstrates the use of cookie. (W2023)
29. What do you mean by session tracking? What are the session 7
tracking techniques? Demonstrate any of them. (S2023, W2022,
OW2020)
30. What are cookies? Explain functionality of Cookie. Demonstrate the 7
use of cookies in servlet. Also write code to display contents of
cookie on page. (S2022, OS2023, OS2021, OS2019, OS2018)
31. Explain various Session tracking mechanisms in servlet with 7
example. (OW2022)
32. Write a Servlet that takes two numbers as an input and display 7
Multiplication of that no’s. Also write web.xml description for the
servlet. (OW2022)
33. Write a Web application using servlet to find the sum of all the digits 4
of an input integer. (OS2019)
34. Write a Web application using servlet to find whether entered 4
number is a prime or not. (OS2019)
35. Write a Web application using servlet to reverse the input number. 4
(OW2021)
36. Write a Web application using servlet to find whether entered String 4
is palindrome or not. (OW2021)
37. Write a servlet code for login application using database 7
connectivity. (W2023)
38. Write a servlet code which reads the student details from web page 7
and stores it in database. (W2021)
39. Write a servlet code to demonstrate prepare statement and callable 7
statement to retrieve and store bank account operations. (OW2021)
40. Write a servlet code to demonstrate prepare statement and callable 7
statement to retrieve and store employee data. (OS2919)
41. Define Session. Write a Java servlet which store items in shopping 7
carts and generate invoice at end to demonstrate Session.
(OW2021)
42. List out methods used in servlet lifecycle. Write a servlet which 7
retrieve students marksheet data based on student registration
number entered from result.html html page and print on browser
screen. (OS2022)
43. Write a Java Servlet to print BE Semester Marksheet of entered 7
enrollment number and sem no by student using JDBC. (OS2019,
OS2018)
Computer Engineering Department
Government Engineering College Dahod

44. Design a form to input details of an employee and submit the data to 7
a servlet. Write code for servlet that will save the entered details as
a new record in database table Employee with fields (EmpId,
EName, Email, Age). (OS2018)

You might also like