18th
Sep
JSP MCQ

JSP MCQ

  • Admin
  • 18th Sep, 2021
  • 369 Followers

JSP MCQ Quiz

Following are mostly asked Jsp MCQ test that are designed for professionals like you to crack you interviews. You can take this Jsp online test before appearing to you real interview. This Jsp quiz there are around 30+ multiple choice questions on Jsp with four options.

1) JSP stands for ___.

  • A. Java Server Pages
  • B. Java Side Pages
  • C. Java Server Phase
  • D. All of the above

2) What is JSP?

  • 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

3) Which of the following is the correct syntax to declare comments in JSP?

  • A. <%-- This is JSP comment --%>
  • B. <!-- This is JSP comment -->
  • C. //..
  • D. All of the above

4) Which of the following is not a directive?

  • A. include
  • B. page
  • C. export
  • D. useBean

5) 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
Download Free : JSP MCQ PDF

6) 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 >

7) A JSP page consists of which tags?

  • A. HTML tags
  • B. JSP tags
  • C. Both A & B
  • D. None of the above

8) Which packages does a JSP API consist of?

  • A. javax.servlet.jsp
  • B. java.servlet
  • C. javax.servlet.jsp.tagext
  • D. Both A & C

9) JDBC stands for __.

  • A. Java Database Connectivity
  • B. Jar Database Connectivity
  • C. Java Database Content
  • D. None of the above

10) Is JSP technology extensible?

  • A. True
  • B. False

11) Which of the following is true about tag?

  • 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

12) What are the advantages of JSP?

  • A. platform independent
  • B. good performance and scalability
  • C. easily maintained
  • D. All of the above

13) What is the use of tag?

  • 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.

14) Compilation process of JSP page involves:

  • A. Parsing of JSP
  • B. Turning JSP into servlet
  • C. Compiling the servlet
  • D. All of the above

15) What is the use of tag?

  • A. It removes a item from a list
  • B. It removes the data row from the database.
  • C. It removes a variable from either a specified scope or the first scope where the variable is found.
  • D. None of the above

16) What is the synatx of JSP Page directive?

  • A. <%@ page…%>
  • B. <% page…%>
  • C. <!@ page…!>
  • D. None of the above

17) Which syntax is used to defines the programming language (underlying language) being used in the JSP?

  • A. <%@ page language="value" %>
  • B. <!@ page language="value" !>
  • C. <@ page language="value" >
  • D. None of the above

18) What JSTL stands for?

  • A. JSP Tag Library
  • B. JavaServer Pages Standard Tag Library
  • C. Java Standard Tag Library
  • D. None of the above.

19) 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

20) Which of the following is true about action?

  • 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

21) Which one of the following is a syntax to create a simple JSP?

  • A. <html> <body> <% out.print(2*5); %> </body> </html>
  • B. <html> <body> <! out.print(2*5); !> </body> </html>
  • C. <html> <body> <%@ out.print(2*5); %> </body> </html>
  • D. None of the above

22) Application is instance of which class?

  • A. javax.servlet.HttpContext
  • B. javax.servlet.ServletContext
  • C. javax.servlet.Context
  • D. javax.servlet.Application

23) Which tag should be used to pass information from JSP to included JSP?

  • A. Using <%jsp:param> tag
  • B. Using <%jsp:page> tag
  • C. Using <%jsp:useBean> tag
  • D. Using <%jsp:import> tag

24) Which option is true about session scope?

  • 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

25) Default value of autoFlush attribute is?

  • A. True
  • B. False

26) Which one is the correct order of phases in JSP life cycle?

  • A. Compilation, Initialization, Execution, Cleanup
  • B. Cleanup, Compilation, Initialization, Execution
  • C. Initialization, Cleanup, Compilation, Execution
  • D. Initialization, Compilation, Cleanup, Execution

27) Request is instance of which one of the following classes in jsp:

  • A. ServletRequest
  • B. HttpServletRequest
  • C. Request
  • D. HttpRequest

28) Which is mandatory in tag?

  • A. id, type
  • B. type, property
  • C. type,id
  • D. id, class

29) The difference between Servlets and JSP is:

  • A. compilation
  • B. translation
  • C. Both A and B
  • D. syntax

30) 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

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

01st
Sep
Laravel MCQ
01st
Sep
Xml MCQ
01st
Sep
Hadoop MCQ
01st
Sep
OOPs MCQ
01st
May
C++  MCQ
01st
Apr
Appium MCQ