11. What is the role of the `init()` method in Java Servlets? A. To handle HTTP requests B. To create JavaBean properties C. To initialize the servlet D. To define JavaBean lifecycle 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
12. Which of the following is true about servlet containers (e.g., Tomcat)? A. They are used for creating JavaBeans B. They are responsible for executing SQL queries C. They handle JavaBean properties D. They manage the lifecycle of servlets 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
13. What does the term "URL mapping" refer to in Java Servlets? A. Associating a URL pattern with a servlet B. Mapping a URL to a JavaBean C. Mapping a URL to a database table D. Mapping a URL to a Java class 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
14. Which of the following is NOT a standard HTTP status code in Java Servlets? A. `500 Internal Server Error` B. `403 Forbidden` C. `200 OK` D. `404 Not Found` 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
15. 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 map a URL pattern to a servlet 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
16. What is a servlet container in Java web applications? A. A database for JavaBeans B. Software that manages the execution of servlets C. A Java keyword 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
17. In Java Servlets, what is the purpose of the `doFilter()` method in the `Filter` interface? A. To create JavaBeans B. To execute SQL queries C. To perform filtering tasks on requests and responses 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
18. What is the purpose of the `context-param` element in the `web.xml` file of a Java web application? A. To define JavaBean properties B. To execute SQL queries C. To create JavaBeans D. To define context-specific parameters 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
19. Which Java package contains the core classes and interfaces for servlets? A. `javax.servlet` B. `java.beans` C. `java.jdbc` D. `java.db` 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
20. What is the role of the `HttpSession` interface in Java Servlets? A. To create JavaBeans B. To execute SQL queries C. To define JavaBean properties D. To provide session management capabilities 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