Sail E0 Webinar

MCQs

Total Questions : 20 | Page 2 of 2 pages
Question 11. How many JDBC driver types does Sun define?
  1.    One
  2.    Two
  3.    Four
  4.    Three
 Discuss Question
Answer: Option C. -> Four




Question 12. The life cycle of a servlet is managed by
  1.    servlet context
  2.    servlet container
  3.    the supporting protocol (such as http or https)
  4.    All of the above
 Discuss Question
Answer: Option B. -> servlet container




Question 13. Which of the following method sets application/context init parameter?
  1.    setParameter(String name,String value)
  2.    Its not possible in the method
  3.    setParameter(String name,Object value)
  4.    setParameter(Object name,Object value)
 Discuss Question
Answer: Option C. -> setParameter(String name,Object value)




Question 14. Which method shows the client what server is receiving?
  1.    goGet
  2.    doOption
  3.    doTrace
  4.    doPost
 Discuss Question
Answer: Option A. -> goGet




Question 15. What are the features added in Servlet 2.5?
  1.    Dependency on J2SE 5.0
  2.    Support for annotations
  3.    Loading the class
  4.    All of these
 Discuss Question
Answer: Option D. -> All of these




Question 16. Which of the following are interface?
1. ServletContext
2. Servlet
3. GenericServlet
4. HttpServlet
  1.    1,2,3,4
  2.    1,2
  3.    1,3,4
  4.    1,4
 Discuss Question
Answer: Option B. -> 1,2




Question 17. RequestDispatcher object is used
  1.    to include other resources
  2.    to include an image
  3.    to include xml object
  4.    to include e-mailing response
 Discuss Question
Answer: Option A. -> to include other resources




Question 18. Which method take a string not a URL?
  1.    sendRedirect
  2.    forward
  3.    Both
  4.    None
 Discuss Question
Answer: Option A. -> sendRedirect




Question 19. What is the meaning of response.setHeader("xyz", "abc");
  1.    Add a new header and value
  2.    Add an additional value to exiting header
  3.    Add a new header and value or add an additional value to exiting header
  4.    Add new header and value always
 Discuss Question
Answer: Option A. -> Add a new header and value




Question 20. To send text output in a response, the following method of HttpServletResponse may be used to get the appropriate Writer/Stream object.
  1.    getStream
  2.    getOutputStream
  3.    getBinaryStream
  4.    getWriter
 Discuss Question
Answer: Option C. -> getBinaryStream




Latest Videos

Latest Test Papers