On This Page

This set of Advanced JAVA Multiple Choice Questions & Answers (MCQs) focuses on JSP

Q1 | Which of the following is an advantage of the statement – Separation of business logicfrom JSP ?
  • Custom Tags in JSP
  • JSP Standard Tag Library
  • All the above
  • None of the above
Q2 | JSPs eventually are compiled into Java servlets, you can do as much with JSPs as you cando with Java servlets.
  • True
  • False
  • none
  • all
Q3 | JavaServer Pages often serve the same purpose as programs implemented using theCommon Gateway Interface (CGI)
  • True
  • False
  • none
  • all
Q4 | Which is the Microsoft solution for providing dynamic Web content?
  • ASP
  • JSP
  • Both A and B
  • None of the above
Q5 | Which tag is used to execute java source code in JSP?
  • Declaration Tag
  • Scriptlet tag
  • Expression tag
  • None of the above
Q6 | A JSP page consists of which tags?
  • HTML tags
  • JSP tags
  • Both A & B
  • None of the above
Q7 | Which packages does a JSP API consist of?
  • javax.servlet.jsp
  • java.servlet
  • javax.servlet.jsp.tagext
  • Both A & C
Q8 | Which of the scripting of JSP not putting content into service method of the convertedservlet?
  • Declarations
  • Scriptlets
  • Expressions
  • None of the above
Q9 | The difference between Servlets and JSP is the …………….
  • translation
  • compilation
  • syntax
  • Both A and B
Q10 | Which of the following are the valid scopes in JSP?
  • request, page, session, application
  • request, page, session, global
  • response, page, session, application
  • request, page, context, application
Q11 | JSP includes a mechanism for defining …………………………. or custom tags.
  • static attributes
  • local attributes
  • dynamic attributes
  • global attributes
Q12 | Why DB connections are not written directly in JSPs?
  • Response is slow
  • Not a standard J2EE architecture
  • Load Balancing is not possible
  • Both B and C
Q13 | Which is not a directive?
  • include
  • page
  • export
  • taglib
Q14 | Which http method send by browser that asks the server to get the page only?
  • get
  • option
  • put
  • post
Q15 | Which tag should be used to pass information from JSP to included JSP?
  • Using <%jsp:page> tag
  • Using <%jsp:param> tag
  • Using <%jsp:import> tag
  • Using <%jsp:useBean> tag
Q16 | _jspService() method of HttpJspPage class should not be overridden.
  • True
  • False
  • none
  • all
Q17 | Which is not a directive?
  • include
  • page
  • export
  • useBean
Q18 | Attribute used to handle web flow requests.
  • servlet-mapping
  • servlet-attr
  • servlet-flow
  • servlet-requests
Q19 | To resolve Facelets views we configure:
  • ViewFacelets
  • ViewResolver
  • View-resolver
  • View_Resolver
Q20 | File extension of a view state’s name which is by default loaded by facelet page.
  • .xml
  • .hbm.xml
  • .xhtml
  • none of the mentioned
Q21 | Navigation in traditional JSF applications is handled by:
  • linking directly linking to a resource
  • commandLink
  • invoking an action
  • all of the mentioned
Q22 | For cross field validation or some sort of barrier to ensure state before you start aflow, we use.
  • FacesContext
  • FaceletContext
  • FacesResolver
  • All of the mentioned
Q23 | Component which additionally provides a pop-up date picker control for its enclosedinput field.
  • clientDateValidator
  • clientValidator
  • dateValidator
  • validator
Q24 | Component which encloses command button.
  • validateAll
  • validateAllClick
  • validateAllInClick
  • validateAllOnClick
Q25 | Which of the following is not a core interface of Hibernate?
  • Configuration
  • Criteria
  • SessionManagement
  • Session