Questions
A servlet instance (object) is created during the execution of JSP.
- True
- False
which xml file is been used by Web Container as a deployment descriptor to deploy Web Applications?
- ejb-jar.xml
- Can be any valid xml containing Web Module name
- web.xml
- config.xml
A servlet can handle multiple requests concurrently.
- True
- False
Through a ServletContext object, servlets can interact with their enviornment.
- True
- False
To get an object of PrintWriter, we use getWriter() method of class _____________
- HttpSession
- HttpServletResponse
- HttpServletRequest
- None
A life-cycle method of a servlet is_________________
- init()
- service()
- destroy()
- All the above
Number of ServletContext object present for an application is __________
- 2
- 1
- Not Fixed
- 3
The method used for fetching object in the request object is __________
- getAttribute()
- getParameter()
- getInitParameter()
- None
Servlets are multi threaded
- True
- False
In the init(ServletConfig) method of Servlet life cycle, what method can be used to access the ServletConfig object ?
- getServletInfo()
- getInitParameters()
- getServletConfig()
- None
Which of the following is server side programming languages?
- HTML
- JavaScript
- JSP
- Sevlets
What JSP stand for
- Java Server Pages
- Java Server Programming
- Java Service Pages
- Java Service Programming
We must have configure and map all jsp files into web.xml
- True
- False
JSP can run by
- Apache Tomact
- Bea WebLogic
- Servlets
- JSP Engine
Syntax of Scriptlet Element
- <% code %>
- <@jsp code %>
- <jsp: scriptlet code />
- <%jsp code %>
Syntax of Declaration Element
- <%! code !%>
- <%! code %>
- <jsp: scriptlet code />
- <%jsp code !%>
JSP Syntax of comments
- <%-- comment --%>
- <!-- comment -->
- <% // comment %>
- <% /* comment */ %>
- <% /** comment */ %>
Which of the following archive files can be deployed in a Web Server?
- jar
- war
- jar, war
- jar, war, ear
Which of the following statements are true?
- HttpServletRequest getParameter(...) retrieves the parameter value from the request
- HttpServletResponse getAttribute(...) retrieves the attribute value from the response
- HttpServletResponse getParameter(...) retrieves the parameter value from the response
- HttpServletRequest setParameter(...) sets the parameter value to the request
Attributes bound into session are available to any other servlet that belong to the same ServletContext?
- True
- False