0

web technology Online Quiz - 58

Description: web technology Online Quiz - 58
Number of Questions: 20
Created by:
Tags: web technology
Attempted 0/20 Correct 0 Score 0

URL instance represents the location of a resource

  1. True

  2. False


Correct Option: A

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

  1. AirthmaticFormat 

  2. CurrencyFormat 

  3. NumberFormat 

  4. StringBuffer


Correct Option: C

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

  1. True

  2. False


Correct Option: A

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

  1. True

  2. False


Correct Option: A

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

  1. SessionTimeoutIndicator

  2. SessionTotalTimedoutIndicator

  3. SessionTotalTimeOutIndicator

  4. SessionTimedoutIndicator


Correct Option: A

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)


Correct Option: A

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.


Correct Option: A,B,C,D

What is the role played by JSP in the MVC architecture

  1. Model

  2. View

  3. Controller

  4. None of the above


Correct Option: A

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

  1. True

  2. False


Correct Option: A

AI Explanation

To answer this question, you need to understand the purpose of the jsp:plugin tag.

The jsp:plugin tag is indeed used to insert the browser-specific OBJECTS and EMBED elements into a JSP (JavaServer Pages) page. These elements are used for embedding multimedia content, such as images, audio, video, and other types of media, into a web page.

Therefore, the correct answer is A) True.

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


Correct Option: A

AI Explanation

To answer this question, you need to understand the JspPage interface and its methods.

The JspPage interface in JavaServer Pages (JSP) defines two methods that the page writer can use in their pages, which are invoked in a similar manner as the init() and destroy() methods of a servlet.

Let's go through each option to understand why it is correct or incorrect:

Option A) jspInit(), jspDestroy(), init(), destroy() - This option is correct. The JspPage interface defines the jspInit() and jspDestroy() methods, which are similar to the init() and destroy() methods of a servlet.

Option B) init(), jspDestroy(), jspInit(), destroy() - This option is incorrect. The order of the methods is incorrect.

Option C) destroy(), jspDestroy(), jspInit(), init() - This option is incorrect. The order of the methods is incorrect.

Option D) init(), destroy(), jspInit(), jspDestroy() - This option is incorrect. The order of the methods is incorrect.

The correct answer is Option A) jspInit(), jspDestroy(), init(), destroy(). This option is correct because it correctly lists the methods defined by the JspPage interface and their order.

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.


Correct Option: A,B,C,D

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) Objects with session scope are accessible from pages processing requests that are in the same session as the one in which they were created.

This option is correct because objects with session scope in JSP can be accessed from other pages that are part of the same session. The session scope ensures that the objects can retain their values across multiple requests within the same session.

Option B) It is not legal to define an object with session scope from within a page that is not session-aware.

This option is incorrect. In JSP, it is possible to define an object with session scope from within a page that is not session-aware. However, the object will only be accessible within the session for which it was created.

Option C) All references to the object shall be released after the associated session ends.

This option is correct. When a session ends, all objects with session scope associated with that session are destroyed and their references are released. This ensures proper memory management and prevents memory leaks.

Option D) References to objects with session scope are stored in the session object associated with the page activation.

This option is incorrect. References to objects with session scope are not stored in the session object associated with the page activation. Instead, they are stored in a separate session object that is associated with the session.

Based on the explanations above, the correct answer is A, B, C, D.

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

  1. True

  2. False


Correct Option: A

What are the Keyword parameters in JOB statement?

  1. CLASS,PRTY,MSGLEVEL

  2. TYPRUN,NOTIFY,MSGCLS

  3. Both 1 and 2

  4. None of the above


Correct Option: C

What does HTML stand for?

  1. Hyper Text Makeup Language

  2. Hyper Text Markup Language

  3. Hyper Text MainframeLanguage

  4. Hyper Text Machine Language


Correct Option: B

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

  1. photo

  2. graphic

  3. pic

  4. img


Correct Option: D

What does the A tag stand for?

  1. announce

  2. attribute

  3. anchor

  4. assign


Correct Option: C

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


Correct Option: B

What does the tag “TR” stand for?

  1. table roll

  2. table rank

  3. table row

  4. table register


Correct Option: C
- Hide questions