MCQ Bank
A GET request results from a normal request for a URL or from an HTML form that has no METHOD specified and it should be handled by _______ method.
- A) doPost()
- B) post()
- C) get()
- D) doGet()
The init method is designed to be called ____________.
- A) twice
- B) only once
- C) many times
- D) thrice
The RequestDispatcher interface provides the facility of dispatching the request to another resource it may be ___________.
- A) Servlet Only
- B) Any of HTML, JSP or Servlet
- C) HTML Only
- D) JSP Only
_________ is the protocol that allows web servers and browsers to exchange data over the web.
- A) JAXB
- B) XML
- C) HTTP
- D) Servlet
How many methods are defined in RequestDispatcher interface?
- A) 4
- B) 1
- C) 2
- D) 3
A POST request results from an HTML form that specifically lists POST as the METHOD and it should be handled by _____________ method.
- A) doGet()
- B) get()
- C) doPost()
- D) post()
For compiling the Servlet, ________ file is required to be loaded.
- A) jar
- B) pdf
- C) html
- D) xml
The servlet is terminated by calling the ______________ method.
- A) servlet()
- B) terminate()
- C) end()
- D) destroy()
The servlet is initialized by calling the __________ method.
- A) destroy()
- B) servlet()
- C) init ()
- D) service()
Which of the following is not a benefit of Servlet?
- A) Low Performance
- B) Secure
- C) Robust
- D) Portable
The servlet container loads the servlet before invoking the ___________ method.
- A) doPost
- B) init()
- C) service()
- D) doGet()
Creating war file has an advantage that moving the project from one location to another takes _____ time.
- A) Correct time as required
- B) Less
- C) More
- D) Some extra time
Which of the following is used to request data from a server?
- A) DTD
- B) XMLHttpRequest object
- C) XLink
- D) XML Schema
Node object can have ________________.
- A) only one parent node object.
- B) only two parent node objects.
- C) many parent node objects.
- D) any number of parent node objects.
Following are important node properties except:
- A) nodeAddress
- B) nodeType
- C) nodeName
- D) nodeValue
________ keyword indicates that attribute is optional.
- A) REQUIRED
- B) FIXED
- C) None of the given
- D) IMPLIED
POST has _________ size limitations.
- A) No size limitations
- B) 100 characters per request
- C) 50 characters per request
- D) 150 characters per request
In XML schema ______ is used to indicate child elements in an element.
- A) xmlns
- B) complexType
- C) sequence
- D) targetNamespace
getElementsByTagName() method is used to access a _________.
- A) Property
- B) Node
- C) Object
- D) DOM
Attributes are always placed inside the _______ of an element.
- A) None of the above
- B) opening tag
- C) header
- D) footer