Tag: web technology

Questions Related to web technology

  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
  1. Model

  2. View

  3. Controller

  4. None of the above


Correct Option: A
  1. jspInit(), jspDestroy(), init() , destroy()

  2. init(),jspDestroy(),jspInit(),destroy()

  3. destroy(),jspDestroy(),jspInit(),init()

  4. init(),destroy(),jspInit(), jspDestroy()


Correct Option: A

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.

ServletContext class gives information about the Request?

  1. True

  2. False


Correct Option: A
  1. CLASS,PRTY,MSGLEVEL

  2. TYPRUN,NOTIFY,MSGCLS

  3. Both 1 and 2

  4. None of the above


Correct Option: C
  1. Hyper Text Makeup Language

  2. Hyper Text Markup Language

  3. Hyper Text MainframeLanguage

  4. Hyper Text Machine Language


Correct Option: B