JSP MCQ
JSP MCQ
com
JSP MCQ Quiz
A. Java Server Pages (JSP) is a server-side programming technology that enables the creation of
dynamic, platform-independent method for building Web-based applications.
B. Java Server Pages (JSP) is a client-side programming technology that enables the creation of
dynamic, platform-independent method for building Web-based applications.
C. Both A and B
D. None of the above
Q3. Which of the following is the correct syntax to declare comments in JSP?
A. include
B. page
C. export
D. useBean
Q5. Which technology do we mix our business logic with the presentation logic?
A. Servlet
B. JSP
C. Both A & B
D. None of the above
Q6. Which JSP Action tags is used to include the content of another resource, it may be
JSP, html or Servlet?
A. <jsp:include >
B. <jsp:forward >
C. <jsp:plugin >
D. <jsp:papam >
A. HTML tags
B. JSP tags
C. Both A & B
D. None of the above
A. javax.servlet.jsp
B. java.servlet
C. javax.servlet.jsp.tagext
D. Both A & C
A. True
B. False
A. The <c:redirect > tag redirects the browser to an alternate URL by providing automatically URL
rewriting.
B. The <c:redirect > tag supports context-relative URLs.
C. The <c:redirect > tag supports <c:param> tag.
D. All of the above
Q12. What are the advantages of JSP?
A. platform independent
B. good performance and scalability
C. easily maintained
D. All of the above
A. to catch any Throwable that occurs in its body and optionally exposes it.
B. to catch the runtime error and redirect to error page.
C. Both of the above.
D. None of the above.
A. Parsing of JSP
B. Turning JSP into servlet
C. Compiling the servlet
D. All of the above
A. <%@ page…%>
B. <% page…%>
C. <!@ page…!>
D. None of the above
Q17. Which syntax is used to defines the programming language (underlying language)
being used in the JSP?
Q19. A __ is used to insert the value of a scripting language expression, converted into
a string, into the data stream returned to the client.
A. JSP expression
B. ASP
C. PHP
D. None of the above
A. useBean action first searches for an existing object utilizing the id and scope variables. If an object
is not found, it then tries to create the specified object.
B. useBean is used to load java beans in jsp page.
C. Both of the above.
D. None of the above
A. javax.servlet.HttpContext
B. javax.servlet.ServletContext
C. javax.servlet.Context
D. javax.servlet.Application
Q23. Which tag should be used to pass information from JSP to included JSP?
A. Objects are accessible only from the pages which are processing the same request
B. Objects are accessible only from the pages which reside in same application
C. Objects are accessible only from the page in which they are created
D. Objects are accessible only from the pages which are in same session
A. True
B. False
Q26. Which one is the correct order of phases in JSP life cycle?
A. ServletRequest
B. HttpServletRequest
C. Request
D. HttpRequest
A. id, type
B. type, property
C. type,id
D. id, class
A. compilation
B. translation
C. Both A and B
D. syntax
Q30. Which of the scripting of JSP not putting content into service method of the
converted servlet?
A. Declarations
B. Expressions
C. Scriptlets
D. All of the above