Top 80+ Solved J2EE Technologies MCQ Questions Answer

From 61 to 75 of 100

Q. Which tag should be used to pass information from JSP to included JSP?

a. Using <%jsp:page> tag

b. Using <%jsp:param> tag

c. Using <%jsp:import> tag

d. Using <%jsp:useBean> tag

  • a. Using <%jsp:page> tag

Q. Application is instance of which class?

a. javax.servlet.Application

b. javax.servlet.HttpContext

c. javax.servlet.Context

d. javax.servlet.ServletContext

  • d. javax.servlet.ServletContext

Q. _jspService() method of HttpJspPage class should not be overridden.

a. True

b. False

c. none

d. all

  • a. True

Q. Which option is true about session scope?

a. Objects are accessible only from the page in which they are created

b. Objects are accessible only from the pages which are in same session

c. Objects are accessible only from the pages which are processing the same request

d. Objects are accessible only from the pages which reside in same application

  • b. Objects are accessible only from the pages which are in same session

Q. Default value of autoFlush attribute is?

a. true

b. false

c. none

d. all

  • a. true

Q. Which one is the correct order of phases in JSP life cycle?

a. Initialization, Cleanup, Compilation, Execution

b. Initialization, Compilation, Cleanup, Execution

c. Compilation, Initialization, Execution, Cleanup

d. Cleanup, Compilation, Initialization, Execution

  • c. Compilation, Initialization, Execution, Cleanup

Q. “request” is instance of which one of the following classes?

a. Request

b. HttpRequest

c. HttpServletRequest

d. ServletRequest

  • c. HttpServletRequest

Q. Which is not a directive?

a. include

b. page

c. export

d. useBean

  • c. export

Q. Which is mandatory in tag?

a. id, class

b. id, type

c. type, property

d. type,id

  • a. id, class

Q. Which one of the following is correct for directive in JSP?

a. <%@directive%>

b. <%!directive%>

c. <%directive%>

d. <%=directive%>

  • a. <%@directive%>

Q. Which of the following action variable is used to include a file in JSP?

a. jsp:setProperty

b. jsp:getProperty

c. jsp:include

d. jsp:plugin

  • c. jsp:include

Q. Which attribute uniquely identification element?

a. ID

b. Class

c. Name

d. Scope

  • a. ID

Q. “out” is implicit object of which class?

a. javax.servlet.jsp.PrintWriter

b. javax.servlet.jsp.SessionWriter

c. javax.servlet.jsp.SessionPrinter

d. javax.servlet.jsp.JspWriter

  • d. javax.servlet.jsp.JspWriter

Q. Which object stores references to the request and response objects?

a. sessionContext

b. pageContext

c. HttpSession

d. sessionAttribute

  • b. pageContext

Q. What temporarily redirects response to the browser?

a. <jsp:forward>

b. <%@directive%>

c. response.sendRedirect(URL)

d. response.setRedirect(URL)

  • c. response.sendRedirect(URL)
Subscribe Now

Get All Updates & News