architecture Online Quiz - 18

architecture Online Quiz - 18

20 Questions Published

Questions

Question 1 True/False

A servlet instance (object) is created during the execution of JSP.

  1. True
  2. False
Question 2 Multiple Choice (Single Answer)

which xml file is been used by Web Container as a deployment descriptor to deploy Web Applications?

  1. ejb-jar.xml
  2. Can be any valid xml containing Web Module name
  3. web.xml
  4. config.xml
Question 3 True/False

A servlet can handle multiple requests concurrently.

  1. True
  2. False
Question 4 True/False

Through a ServletContext object, servlets can interact with their enviornment.

  1. True
  2. False
Question 5 Multiple Choice (Single Answer)

To get an object of PrintWriter, we use getWriter() method of class _____________

  1. HttpSession
  2. HttpServletResponse
  3. HttpServletRequest
  4. None
Question 6 Multiple Choice (Single Answer)

A life-cycle method of a servlet is_________________

  1. init()
  2. service()
  3. destroy()
  4. All the above
Question 7 Multiple Choice (Single Answer)

Number of ServletContext object present for an application is __________

  1. 2
  2. 1
  3. Not Fixed
  4. 3
Question 8 Multiple Choice (Single Answer)

The method used for fetching object in the request object is __________

  1. getAttribute()
  2. getParameter()
  3. getInitParameter()
  4. None
Question 9 True/False

Servlets are multi threaded

  1. True
  2. False
Question 10 Multiple Choice (Single Answer)

In the init(ServletConfig) method of Servlet life cycle, what method can be used to access the ServletConfig object ?

  1. getServletInfo()
  2. getInitParameters()
  3. getServletConfig()
  4. None
Question 11 Multiple Choice (Multiple Answers)

Which of the following is server side programming languages?

  1. HTML
  2. JavaScript
  3. JSP
  4. Sevlets
Question 12 Multiple Choice (Single Answer)

What JSP stand for

  1. Java Server Pages
  2. Java Server Programming
  3. Java Service Pages
  4. Java Service Programming
Question 13 True/False

We must have configure and map all jsp files into web.xml

  1. True
  2. False
Question 14 Multiple Choice (Multiple Answers)

JSP can run by

  1. Apache Tomact
  2. Bea WebLogic
  3. Servlets
  4. JSP Engine
Question 15 Multiple Choice (Single Answer)

Syntax of Scriptlet Element

  1. <% code %>
  2. <@jsp code %>
  3. <jsp: scriptlet code />
  4. <%jsp code %>
Question 16 Multiple Choice (Single Answer)

Syntax of Declaration Element

  1. <%! code !%>
  2. <%! code %>
  3. <jsp: scriptlet code />
  4. <%jsp code !%>
Question 17 Multiple Choice (Single Answer)

JSP Syntax of comments

  1. <%-- comment --%>
  2. <!-- comment -->
  3. <% // comment %>
  4. <% /* comment */ %>
  5. <% /** comment */ %>
Question 18 Multiple Choice (Single Answer)

Which of the following archive files can be deployed in a Web Server?

  1. jar
  2. war
  3. jar, war
  4. jar, war, ear
Question 19 Multiple Choice (Single Answer)

Which of the following statements are true?

  1. HttpServletRequest getParameter(...) retrieves the parameter value from the request
  2. HttpServletResponse getAttribute(...) retrieves the attribute value from the response
  3. HttpServletResponse getParameter(...) retrieves the parameter value from the response
  4. HttpServletRequest setParameter(...) sets the parameter value to the request
Question 20 True/False

Attributes bound into session are available to any other servlet that belong to the same ServletContext?

  1. True
  2. False