A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

11. Which of the following is not a jsp directive?
a. include
b. page
c. scriptlet
d. useBean
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).useBean

12. Which of the following is true about Cleanup phase in JSP life cycle?
a. The destruction phase of the JSP life cycle represents when a JSP is being removed from use by a container.
b. The jspDestroy() method is the JSP equivalent of the destroy method for servlets.
c. Both of the above.
d. None of the above.
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).Both of the above.

13. What JSTL stands for?
a. JavaServer Pages Standard Tag Library
b. JSP Tag Library
c. Java Standard Tag Library
d. None of the above.
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).JavaServer Pages Standard Tag Library

14. Which of the following is a server side technology?
a. html
b. jsp
c. javaScript
d. css
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).jsp

15. PageContext is instance of which class?
a. javax.servlet.ServletContext
b. javax.servlet.ServletConfig
c. javax.servlet.jsp.PageContext
d. javax.servlet.Application
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).javax.servlet.jsp.PageContext

16. Which of the following is true about info Attribute?
a. The info attribute lets you provide a description of the JSP.
b. The info attribute is used by JSP container for optimization of generated servlet code.
c. Both of the above.
d. None of the above.
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).The info attribute lets you provide a description of the JSP.

17. Which of the following attributes are used in jsp:include tag?
a. id, type
b. page, flush
c. type, class
d. type,page
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).page, flush

18. Which of the following is true about Initialization phase in JSP life cycle?
a. When a container loads a JSP it invokes the jspInit() method before servicing any requests.
b. Container invokes _jspService() method during Initialization phase.
c. Both of the above.
d. None of the above.
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).When a container loads a JSP it invokes the jspInit() method before servicing any requests.

19. What is the correct signature of _jspService() method of HttpJspPage class?
a. void _jspService(HTTPRequest request, HTTPResponse response)
b. void _jspService(HTTPRequest request, HTTPResponse response) throws ServletException, IOException
c. void _jspService()
d. void _jspService() throws ServletException, IOException
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).void _jspService(HTTPRequest request, HTTPResponse response) throws ServletException, IOException

20. Which of the following is not a valid attribute of a page directives?
a. language
b. extend
c. export
d. import
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).export

Page 2 of 5