Top 250+ Solved Advanced JAVA MCQ Questions Answer
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
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
Q. The difference between Servlets and JSP is the …………….
a. translation
b. compilation
c. syntax
d. Both A and B
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
Q. JSP includes a mechanism for defining …………………………. or custom tags.
a. static attributes
b. local attributes
c. dynamic attributes
d. global 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
Q. Which http method send by browser that asks the server to get the page only?
a. get
b. option
c. put
d. post
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
Q. _jspService() method of HttpJspPage class should not be overridden.
a. True
b. False
c. none
d. all
Q. Attribute used to handle web flow requests.
a. servlet-mapping
b. servlet-attr
c. servlet-flow
d. servlet-requests
Q. To resolve Facelets views we configure:
a. ViewFacelets
b. ViewResolver
c. View-resolver
d. View_Resolver
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