Ch 12: Servlet Lifecycle & Request Dispatching

51 Questions51 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 31 โ€“ 40 of 51 Questions
Page 4 of 6
Q31
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 12๐Ÿท๏ธ 12.9. DTD Attribute Value Types (#REQUIRED, #IMPLIED, #FIXED, Enumerated)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In a Document Type Definition (DTD) attribute list declaration, which value keyword specifies that the attribute is optional and does not require a default value?
๐Ÿ’ป xml Snippet
<!ATTLIST contact fax CDATA #IMPLIED>
  1. A.#IMPLIED
  2. B.#REQUIRED
  3. C.#FIXED
  4. D.#ENUMERATED
Q32
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 12๐Ÿท๏ธ 12.5. DTD Element Category Declarations (EMPTY, ANY, PCDATA)Easy๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which of the following DTD declarations indicates that the element 'note' can contain any combination of parsable character data and nested child elements?
๐Ÿ’ป xml Snippet
<!ELEMENT note ANY>
  1. A.``
  2. B.``
  3. C.``
  4. D.``
Q33
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 12๐Ÿท๏ธ 12.1. XML Validation (Well-formed vs Valid XML)Medium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Determine whether the following XML document is well-formed according to syntax rules: ```xml Tove Jani ```
  1. A.Yes, the document is well-formed.
  2. B.No, because of invalid XML declaration syntax, mismatched tag cases, and an attribute value that is not enclosed in quotes.
Q34
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 12๐Ÿท๏ธ 12.1. XML Validation (Well-formed vs Valid XML)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Under standard W3C XML validation specifications, an XML document is formally classified as a valid document if it satisfies which of the following conditions?
  1. A.The document contains a single root element.
  2. B.The document contains at least one or more root elements.
  3. C.The document is well-formed, has an associated Document Type Definition (DTD) or XML Schema, and complies with all structural rules defined therein.
  4. D.Each element nests inside any enclosing element property.
Q35
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 12๐Ÿท๏ธ 12.5. DTD Element Category Declarations (EMPTY, ANY, PCDATA)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which of the following Document Type Definition (DTD) element declarations indicates that the declared element can contain any combination of parsable character data or child elements?
๐Ÿ’ป xml Snippet
<!-- Declaring an element with ANY content model in DTD -->
<!ELEMENT note ANY>
  1. A.``
  2. B.``
  3. C.``
  4. D.None of the given options
Q36
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 12๐Ÿท๏ธ 12.6. DTD Element Occurrence Operators (+, *,?, sequences)Medium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In a Document Type Definition (DTD), the question mark `?` occurrence operator specifies that the declared child element can occur ________ times inside the parent element.
๐Ÿ’ป xml Snippet
<!ELEMENT note (message?)>
  1. A.one or two
  2. B.three or four
  3. C.zero or one
  4. D.one or more
Q37
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 12๐Ÿท๏ธ 12.6. DTD Element Occurrence Operators (+, *,?, sequences)Medium๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In a Document Type Definition (DTD), what does the element declaration `` specify regarding the occurrence of the child element `message`?
๐Ÿ’ป xml Snippet
<!ELEMENT note (message?)>
  1. A.The child element `message` must occur once, and only once, inside the `note` element.
  2. B.The child element `message` can occur zero or one time inside the `note` element.
  3. C.The child element `message` must occur one or more times inside the `note` element.
  4. D.The child element `message` can occur zero or more times inside the `note` element.
Q38
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 12๐Ÿท๏ธ 12.4. CDATA vs PCDATA Parsing RulesEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
To instruct the XML parser to ignore a specific block of text containing special characters (such as `<` or `&`) and treat it as unparsed literal character data, which syntax must be used?
๐Ÿ’ป xml Snippet
![CDATA[
function matchwo(a,b) {
    if (a < b && a < 0) {
        return 1;
    } else {
        return 0;
    }
}
]]>
  1. A.` Text to be ignored `
  2. B.``
  3. C.` Text to be ignored `
  4. D.``
Q39
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 12๐Ÿท๏ธ 12.1. XML Validation (Well-formed vs Valid XML)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
What does the term XML Instance (or XML Instance Document) refer to in the context of structured markup languages?
  1. A.An individual XML element node.
  2. B.An XML attribute name-value pair.
  3. C.An actual, concrete XML document containing structured data that complies with schema or DTD specifications.
  4. D.A temporary processing instruction node evaluated by the XML parser.
Q40
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 12๐Ÿท๏ธ 12.4. CDATA vs PCDATA Parsing RulesEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Fill in the blank: Within XML validation and parsing specifications, CDATA (Character Data) represents text that will ________ by an XML parser.
๐Ÿ’ป xml Snippet
<![CDATA[<message>Text not parsed</message>]]>
  1. A.be compiled
  2. B.NOT be parsed
  3. C.be interpreted
  4. D.be translated