21. Which HTTP method is used for updating data on the server in Java Servlets? A. `GET` B. `PUT` C. `POST` D. `DELETE` Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
22. In Java Servlets, what is the purpose of the `HttpServletRequestWrapper` class? A. To manage JavaBean events B. To wrap an existing `HttpServletRequest` C. To execute SQL queries D. None of These Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
23. What is the purpose of the `init-param` element in the `web.xml` file of a Java web application? A. To create JavaBeans B. To execute SQL queries C. To define initialization parameters for a servlet D. To define JavaBean properties Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
24. Which of the following is true about session tracking in Java Servlets? A. Sessions can only be tracked using cookies B. Sessions are not supported in Java Servlets C. Sessions are tracked using SQL queries D. Sessions can be tracked using cookies, URL rewriting, and hidden form fields Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
25. In Java Servlets, what is the purpose of the `HttpServletResponseWrapper` class? A. To wrap an existing `HttpServletResponse` B. To create JavaBeans C. To manage JavaBean properties D. To execute SQL queries Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
26. What is the primary function of the `destroy()` method in Java Servlets? A. To handle HTTP requests B. To create JavaBean properties C. To define JavaBean lifecycle D. To clean up resources and finalize the servlet Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
27. What is the purpose of the `web.xml` `` element in a Java web application? A. To define JavaBean properties B. To execute SQL queries C. To define a filter that can be applied to servlet requests and responses D. To create JavaBeans Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
28. In Java Servlets, what is the purpose of the `HttpServletResponseWrapper` class? A. To manage JavaBean properties B. To wrap an existing `HttpServletResponse` C. To execute SQL queries D. None of These Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
29. What does the term "servlet context" refer to in Java Servlets? A. The context in which JavaBean properties are defined B. The context in which SQL queries are executed C. The environment in which a servlet runs D. The context in which JavaBeans are created Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
30. In Java Servlets, what is the purpose of the `javax.servlet.Filter` interface? A. To define JavaBean properties B. To execute SQL queries C. To create JavaBeans D. To perform filtering tasks on requests and responses Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board