Ch 13: Servlet Context & Configuration

44 Questions44 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 1 โ€“ 10 of 44 Questions
Page 1 of 5
Q1
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 13๐Ÿท๏ธ 13.12. Node List Length and Looping NodesEasy๐Ÿ”โญ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which property of an XML DOM Node List object returns the total count of node objects present within that list?
๐Ÿ’ป javascript Snippet
var xLen = xmlDoc.getElementsByTagName('title').length;
  1. A.size
  2. B.count
  3. C.length
  4. D.index
Q2
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 13๐Ÿท๏ธ 13.13. XML Node Properties (nodeName, nodeValue, nodeType)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which read-only property of an XML DOM Node object is used to specify or retrieve the category type of that node?
๐Ÿ’ป javascript Snippet
if (x[i].nodeType == 1) {
    // Node is a standard Element node
}
  1. A.nodeName
  2. B.nodeValue
  3. C.nodeType
  4. D.childNodes
Q3
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 13๐Ÿท๏ธ 13.15. Handling Browser White-space DifferencesEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When an XML document is edited using a simple text editor, it often contains line breaks, carriage returns, or space characters between element nodes. What are these characters called?
๐Ÿ’ป xml Snippet
<book>
  <title>Everyday Italian</title>
</book>
  1. A.Null text content
  2. B.Empty element markup
  3. C.White space characters
  4. D.Ignorable processing tokens
Q4
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 13๐Ÿท๏ธ 13.1. Introduction to XML DOM (Document Object Model)Medium๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
For which of the following application scenarios is a DOM-based parser highly recommended and preferred over a SAX-based parser?
  1. A.When the XML document is exceptionally large and parsing memory is heavily constrained.
  2. B.When you only need to process the XML document sequentially from top to bottom.
  3. C.When you need to modify the XML document directly, or require random-access to elements in any order.
  4. D.When you only need to perform high-speed data filtering on incoming streams.
Q5
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 13๐Ÿท๏ธ 13.16. Traversing and Navigating the Node TreeEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In the XML DOM API, what is the term for accessing and traversing different nodes in the node tree by utilizing their hierarchical parent, child, or sibling relationships?
๐Ÿ’ป javascript Snippet
y = x.firstChild;
while (y != null) {
    y = y.nextSibling;
}
  1. A.Validating Nodes
  2. B.Compiling Nodes
  3. C.Navigating Nodes
  4. D.Serializing Nodes
Q6
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 13๐Ÿท๏ธ 13.1. Introduction to XML DOM (Document Object Model)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which parsing approach or model does the W3C DOM (Document Object Model) use to read and represent XML documents in application memory?
  1. A.Event-based (streaming event tokens sequentially through callback interfaces)
  2. B.Tree-based (constructing a complete hierarchical object tree of nodes in RAM)
  3. C.DocumentHandler-based (incrementally mapping parsed text to file system pointers)
  4. D.Rule-based (parsing and interpreting elements using compiled schema logic)
Q7
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 13๐Ÿท๏ธ 13.1. Introduction to XML DOM (Document Object Model)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
True or False: The W3C Document Object Model (DOM) specification includes specialized sub-interfaces, and it can be used to dynamically access, update, and manipulate standard HTML documents.
๐Ÿ’ป javascript Snippet
document.getElementById("demo").innerHTML = "Hello World!";
  1. A.True
  2. B.False
Q8
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 13๐Ÿท๏ธ 13.13. XML Node Properties (nodeName, nodeValue, nodeType)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which property of the XML DOM Document object represents and returns the root node of the parsed XML document tree?
๐Ÿ’ป javascript Snippet
var root = xmlDoc.documentElement;
  1. A.rootNode
  2. B.documentElement
  3. C.firstChild
  4. D.childNodes
Q9
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 13๐Ÿท๏ธ 13.15. Handling Browser White-space DifferencesMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When parsing an XML document using standard W3C DOM specifications in modern web browsers, how are carriage returns, newlines, and spaces between elements (white-spaces) processed, and what issue does this raise?
๐Ÿ’ป javascript Snippet
// Compliant browser counts child nodes including white-space text nodes:
var total = xmlDoc.documentElement.childNodes.length; // May return 9 instead of 4
  1. A.They are completely ignored, posing no impact on the node list child count.
  2. B.They are treated as empty Element nodes (nodeType 1), causing elements to replicate.
  3. C.They are processed as Text nodes (nodeType 3), which alters the expected count of children in a node list.
  4. D.They cause immediate validation failures and throw a ParserConfigurationException.
Q10
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 13๐Ÿท๏ธ 13.3. Node Types and Child Node RulesMediumโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In the XML Document Object Model (DOM) specification, which node type represents a lightweight, minimal Document object designed to temporarily hold a portion or segment of a document tree?
  1. A.DocumentType
  2. B.DocumentFragment
  3. C.EntityReference
  4. D.Attr