JSP MCQ Questions

JSP MCQ Questions

  • Satyam Jaiswal
  • 22nd Nov, 2021

We are introducing here the best JSP MCQ Questions, which are very popular & asked various times. This Quiz contains the best 25+ JSP MCQ with Answers, which cover the important topics of JSP (JavaServer Pages). for which, you can perform best in JSP Exams, Interviews, and Placement activities.

JSP MCQ Questions

1) In jsp action tags which tags are used for bean development?

  • A. jsp:useBean
  • B.jsp:getProperty
  • C.jsp:setPoperty
  • D.All of the above

2) Which of the following is true about action?

  • A. The getProperty action gets the properties of a bean.
  • B.The getProperty action converts the property of a bean to a string, and finally inserts it into the output.
  • C.Both A and B
  • D.None of the above

3) which of the following is not a jsp directive?

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

4) All servlet classes are required to be mapped and configured in web.xml.

  • A. Yes
  • B.No
  • C.May be
  • D.Can't say

5) Which are true about tag libraries in web application?

  • A. A tag library descriptor is an XML document
  • B.It contains information about a library
  • C.it is used by a web container to validate the tags
  • D.All of the above

6) What is the media type of jsp?

  • A. java/jsp
  • B.application/jsp
  • C.text/javax
  • D.java/text

7) Which of the following is not correct statement related to jsp?

  • A. A JSP container is responsible for converting the JSP page into a servlet
  • B.A JSP page cannot be sent as-is to the browser
  • C.A JSP page can be sent as-is to the browser
  • D.All of the above

8) JSP stands for ______.

  • A. Java Side Pages
  • B.Java Server Pages
  • C.Java Server Phases
  • D.None of the above

9) What is the synatx of JSP Page directive?

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

10) JSTL stands for ______.

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

11) The difference between Servlets and JSP is _________.

  • A. compilation
  • B.syntax
  • C.translation
  • D.All of the above

12) Application is instance of ______ class.

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

13) Default value of autoFlush attribute is ________-.

  • A. True
  • B.False

14) Which of the following action variable is used to include a file in jsp?

  • A. jsp:getProperty
  • B.jsp:include
  • C.jsp:plugin
  • D.jsp:setProperty

15) Which of the following is not jsp element?

  • A. directive
  • B.action
  • C.scripting
  • D.None of the above

16) Jsp life cycle includes the following __________.

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

17) A deployment descriptor refers to a configuration file for an artifact that is deployed to some container/engine.

  • A. True
  • B.False

18) A JSP page consists of _____ tags?

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

19) “request” is instance of which one of the ________ classes.

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

20) ________ is mandatory in tag.

  • A. type, property
  • B.id, class
  • C.type,id
  • D.All of the above

21) <%page contentType=”application/pdf”> tag is used in JSP to generate PDF.

  • A. True
  • B.False

22) jspDestroy() method of HttpJspPage class can be overridden.

  • A. Yes
  • B.No
  • C.May be
  • D.Can't say

23) Session is instance of _______ class.

  • A. Session
  • B.ServletSession
  • C.HttpSession
  • D.HttpServletSession

24) PageContext is instance of _______ class.

  • A. servlet.jsp.PageContext
  • B.javax.servlet.PageContext
  • C.javax.servlet.jsp.PageContext
  • D.jsp.PageContext

25) Why DB connections are not written directly in JSPs?

  • A. Not a standard J2EE architecture
  • B.Response is slow
  • C.Load Balancing is not possible
  • D.Both A and C

26) JDBC stands for ______.

  • A. Java Data Connectivity
  • B.Java Database Connectivity
  • C.Java Database Context
  • D.Java Database Content

27) Is JSP technology extensible?

  • A. Yes
  • B.No
  • C.May be
  • D.Can't say

28) JDBC is a ………………… interface, which means that it is used to invoke SQL commands directly.

  • A. low-level
  • B.user
  • C.high level
  • D.GUI

29) What is JDBC?

  • A. Java Idle
  • B.Java API
  • C.Java Interpreter
  • D.None of the above

30) Which of the following is correct for directive in JSP?

  • A. ##<%@directive%>
  • B.<%#directive%>
  • C.<%@directive%>
  • D.None of the above

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

Terraform MCQ
React Js MCQ