Top 250+ Solved Advanced JAVA MCQ Questions Answer

From 181 to 195 of 223

Q. A JSP page consists of which tags?

a. HTML tags

b. JSP tags

c. Both A & B

d. None of the above

  • c. Both A & B

Q. Which packages does a JSP API consist of?

a. javax.servlet.jsp

b. java.servlet

c. javax.servlet.jsp.tagext

d. Both A & C

  • d. Both A & C

Q. Which of the scripting of JSP not putting content into service method of the convertedservlet?

a. Declarations

b. Scriptlets

c. Expressions

d. None of the above

  • c. Expressions

Q. The difference between Servlets and JSP is the …………….

a. translation

b. compilation

c. syntax

d. Both A and B

  • c. syntax

Q. Which of the following are the valid scopes in JSP?

a. request, page, session, application

b. request, page, session, global

c. response, page, session, application

d. request, page, context, application

  • a. request, page, session, application

Q. JSP includes a mechanism for defining …………………………. or custom tags.

a. static attributes

b. local attributes

c. dynamic attributes

d. global attributes

  • c. dynamic attributes

Q. Why DB connections are not written directly in JSPs?

a. Response is slow

b. Not a standard J2EE architecture

c. Load Balancing is not possible

d. Both B and C

  • d. Both B and C

Q. Which is not a directive?

a. include

b. page

c. export

d. taglib

  • c. export

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

  • b. Using <%jsp:param> tag

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

a. True

b. False

c. none

d. all

  • a. True

Q. Which is not a directive?

a. include

b. page

c. export

d. useBean

  • c. export

Q. Attribute used to handle web flow requests.

a. servlet-mapping

b. servlet-attr

c. servlet-flow

d. servlet-requests

  • a. servlet-mapping

Q. To resolve Facelets views we configure:

a. ViewFacelets

b. ViewResolver

c. View-resolver

d. View_Resolver

  • b. ViewResolver

Q. File extension of a view state’s name which is by default loaded by facelet page.

a. .xml

b. .hbm.xml

c. .xhtml

d. none of the mentioned

  • c. .xhtml
Subscribe Now

Get All Updates & News