Ch 15: Java Database Connectivity (JDBC)

73 Questions73 MCQs0 Short Questions0 Long Questions
๐ŸŽฏ Exam Practice Papers
SEMESTER PASS

CS311 - Introduction to Web Services Development Examination Practice

Timed practice exam simulation for CS311 - Introduction to Web Services Development.

๐Ÿ“˜ VU MID TERM EXAMLectures 1 to 22
โฑ๏ธ 60 Mins

Mid Term Examination

Covers syllabus of Lectures 1 to 22 with 30 high-yield MCQs in a timed exam environment.

๐Ÿ“30 MCQs
โฑ๏ธ60 Minutes
๐Ÿ“— VU FINAL TERM EXAMLectures 23 to 45
โฑ๏ธ 90 Mins

Final Term Examination

Comprehensive semester exam preparation with 45 MCQs covering Lectures 23 to 45 with complete course coverage.

๐Ÿ“45 MCQs
โฑ๏ธ90 Minutes
Showing 41 โ€“ 50 of 73 Questions
Page 5 of 8
Q41
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 15๐Ÿท๏ธ 15.9. javax.servlet.http.Cookie and Cookie-based State ManagementEasyโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In Java Servlet state management, a Cookie object is designed to hold specific types of state data. Which of the following is NOT contained or supported inside a standard Cookie?
๐Ÿ’ป java Snippet
Cookie ck = new Cookie("name", "value");
  1. A.A name
  2. B.A single value
  3. C.Multiple values
  4. D.Optional attributes (such as max age, path, and domain)
Q42
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 15๐Ÿท๏ธ 15.8. State Management and Session Tracking OverviewEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which of the following is a valid session tracking technique supported by the Java Servlet specification to maintain user state over the stateless HTTP protocol?
๐Ÿ’ป html Snippet
<!-- Example of URL Rewriting in links -->
<a href="ProfileServlet?uname=Ali">View Profile</a>
  1. A.URL session
  2. B.URL writing
  3. C.URL rewriting
  4. D.Request redirection
Q43
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 15๐Ÿท๏ธ 15.8. State Management and Session Tracking OverviewEasyโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In web applications and state management, which of the following terms refers to a particular interval of time spent in continuous communication between a specific client and a server?
  1. A.Web
  2. B.Servlet
  3. C.Server
  4. D.Session
Q44
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 15๐Ÿท๏ธ 15.12. ServletContext Interface and ConfigurationMediumโญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which method of the `ServletContext` (or `ServletConfig`) interface is used to retrieve the value of a context initialization parameter configured in the deployment descriptor (`web.xml`) by specifying its name?
๐Ÿ’ป xml Snippet
<context-param>
  <param-name>adminEmail</param-name>
  <param-value>admin@vu.edu.pk</param-value>
</context-param>
  1. A.`public String getInitParameter(String name)`
  2. B.`public Enumeration getInitParameterNames()`
  3. C.`public Object getAttribute(String name)`
  4. D.`public void setAttribute(String name, Object object)`
Q45
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 15๐Ÿท๏ธ 15.3. Apache Tomcat Server and Directory StructureEasy๐Ÿ”โญ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When compiling and running a Java servlet on an Apache Tomcat server, which specific JAR library file must be loaded or added to the classpath?
  1. A.javaee.jar
  2. B.java.jar
  3. C.weblogic.jar
  4. D.servlet-api.jar
Q46
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 15๐Ÿท๏ธ 15.11. Hidden Form Fields for State ManagementMediumโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which of the following is NOT a disadvantage of using the Hidden Form Field state management technique?
  1. A.Only textual information can be used.
  2. B.It is maintained at the server side.
  3. C.Extra form submission is required on each page.
  4. D.It will always work whether cookies are enabled or disabled in the browser.
Q47
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 15๐Ÿท๏ธ 15.2. Core Servlet Methods (doGet, doPost, doHead, etc.)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
What are the payload size limitations on data sent to a server using the HTTP POST request method in Java Servlets or XMLHttpRequest?
  1. A.50 characters per request
  2. B.100 characters per request
  3. C.150 characters per request
  4. D.No size limitations
Q48
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 15๐Ÿท๏ธ 15.7. Request Forwarding with RequestDispatcher (forward, include)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which core interface in the `javax.servlet` package provides the programmatic capability of dispatching or routing a client request to another resource (such as an HTML page, a servlet, or a JSP file) on the server?
  1. A.RequestForward
  2. B.RequestBackward
  3. C.RequestBackForward
  4. D.RequestDispatcher
Q49
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 15๐Ÿท๏ธ 15.1. Introduction to Java ServletsEasyโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When a Java servlet is requested by a client for the very first time, which of the following lifecycle tasks is the web container NOT responsible for performing?
  1. A.Calls the init method passing the ServletConfig object
  2. B.Deletes the loaded class from the container's memory
  3. C.Instantiates the servlet class
  4. D.Loads the servlet class
Q50
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 15๐Ÿท๏ธ 15.8. State Management and Session Tracking OverviewEasyโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
How many standard, primary state management techniques are supported in Java Servlet technology for session tracking?
  1. A.Two
  2. B.Three
  3. C.Four
  4. D.Five