HTML, JSP, and Servlets Fundamentals

Test your knowledge of HTML tags, JSP programming, Servlets, session management, cookies, and related web technologies

19 Questions Published

Questions

Question 1 True/False

URL instance represents the location of a resource

  1. True
  2. False
Question 2 Multiple Choice (Single Answer)

To show money format on the JSP page we use __________ class

  1. AirthmaticFormat
  2. CurrencyFormat
  3. NumberFormat
  4. StringBuffer
Question 3 True/False

It is possible to call an external application like MSWord by the click on the JSP page or Servlet?

  1. True
  2. False
Question 4 True/False

Can the constructor be used instead of init () to initialize a Servlet

  1. True
  2. False
Question 5 Multiple Choice (Single Answer)

The ________________________ when added to the user session tells us that the session timed out.

  1. SessionTimeoutIndicator
  2. SessionTotalTimedoutIndicator
  3. SessionTotalTimeOutIndicator
  4. SessionTimedoutIndicator
Question 6 Multiple Choice (Single Answer)

The browsers are only required to accept________ cookies per site, __________ total per user , and they can limit each cookie's size to __________.

  1. 20, 300, 4096 bytes (4K)
  2. 300,20, 4096 bytes (4K)
  3. 30,200, 4096 bytes (4K)
  4. 200,39, 4096 bytes (4K)
Question 7 Multiple Choice (Multiple Answers)

Which of the following is true

  1. out class refers to the output stream for the http page
  2. page class refers to the page Servlet interface
  3. pageContext refers to the pages Servlet interface
  4. config interface refers to the servlets configuration.
Question 8 Multiple Choice (Single Answer)

What is the role played by JSP in the MVC architecture

  1. Model
  2. View
  3. Controller
  4. None of the above
Question 9 True/False

The jsp:plugin tag is used to insert the browser-specific OBJECTS and EMBED elements

  1. True
  2. False
Question 10 Multiple Choice (Single Answer)

The JspPage interface defines the __________ and ____ method which the page writer can use in their pages and are invoked in much the same manner as the ____ and _____ methods of a servlet.

  1. jspInit(), jspDestroy(), init() , destroy()
  2. init(),jspDestroy(),jspInit(),destroy()
  3. destroy(),jspDestroy(),jspInit(),init()
  4. init(),destroy(),jspInit(), jspDestroy()
Question 11 Multiple Choice (Multiple Answers)

Which of the following statements is true regarding the scope of the ‘session’ in JSP?

  1. Objects with session scope are accessible from pages processing requests that are in the same session as the one in which they were created.
  2. It is not legal to define an object with session scope from within a page that is not session-aware.
  3. All references to the object shall be released after the associated session ends.
  4. References to objects with session scope are stored in the session object associated with the page activation.
Question 12 True/False

ServletContext class gives information about the Request?

  1. True
  2. False
Question 13 True/False

There exists a direct API in JSP to verify that the browser accepted the cookie?

  1. True
  2. False
Question 14 Multiple Choice (Single Answer)

Domain name service (DNS) maps one particular IP address to a string of ___________.

  1. characters
  2. digits
  3. special symbols
  4. binary digits
Question 15 Multiple Choice (Single Answer)

What does HTML stand for?

  1. Hyper Text Makeup Language
  2. Hyper Text Markup Language
  3. Hyper Text MainframeLanguage
  4. Hyper Text Machine Language
Question 16 Multiple Choice (Single Answer)

What tag is used when you want to insert a picture?

  1. photo
  2. graphic
  3. pic
  4. img
Question 18 Multiple Choice (Single Answer)

What tag is used when you want to create a name for the page you are creating, so it appears in the title bar of the user’s internet browser?

  1. page
  2. title
  3. name
  4. none
Question 19 Multiple Choice (Single Answer)

What does the tag “TR” stand for?

  1. table roll
  2. table rank
  3. table row
  4. table register