0

web technology Online Quiz - 158

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

The Web server that executes the servlet creates an _________ object and passes this to the servlet's service method (which, in turn, passes it to doGet or doPost).

  1. HttpServletResponce

  2. HttpRequest

  3. ServletRequest

  4. HttpServletRequest


Correct Option: D

The client can access the servlet only if the servlet is installed on a ________ that can respond to servlet requests

  1. CLIENT

  2. SERVER

  3. INTERNET

  4. IN LOCAL PC


Correct Option: B

Which of the following describe ways that dynamic information can be made available to all servlet requests sent to an application?

  1. Make the information available from a singleton

  2. Store the information in the ServletContext

  3. Store the information in an HttpSession

  4. Store the information in a Properties file


Correct Option: C

AI Explanation

To answer this question, you need to understand how dynamic information can be made available to all servlet requests sent to an application. Let's go through each option to understand why it is correct or incorrect:

A) Make the information available from a singleton - This option is incorrect because a singleton is a design pattern that ensures a class has only one instance and provides a global point of access to it. While a singleton can be used to store and access dynamic information, it does not guarantee that the information will be available to all servlet requests.

B) Store the information in the ServletContext - This option is incorrect. The ServletContext is an interface that provides a way for servlets to communicate with the servlet container. While the ServletContext can be used to store and share information across servlets, it does not automatically make the information available to all servlet requests.

C) Store the information in an HttpSession - This option is correct. The HttpSession is an interface that provides a way to store user-specific information across multiple servlet requests and sessions. By storing dynamic information in the HttpSession, it can be accessed by all servlet requests sent by the same user.

D) Store the information in a Properties file - This option is incorrect. A Properties file is a file format commonly used to store static configuration data. While a Properties file can be used to store information, it does not provide a way to make that information available to all servlet requests.

The correct answer is C) Store the information in an HttpSession. This option is correct because the HttpSession allows for the storage of dynamic information that can be accessed by all servlet requests sent by the same user.

Which of the following can be used to store client side user state information while avoiding any impact due to the users web browser configuration ?

  1. Cookies

  2. URL rewriting

  3. HttpSessions

  4. Hidden tags


Correct Option: C

Which of the following is NOT true about servlets?

  1. They are instantiated every time a request is made

  2. They are a mechanism used by the class loader to download applets

  3. They can be used instead of CGI scripts

  4. They require a web browser that supports JDK 1.1


Correct Option: B

What is servlet?

  1. Client side program

  2. Server side program

  3. Both are true

  4. None of these


Correct Option: B

HTML REFERS TO

  1. Hyperlinks and Text Markup Language

  2. Hyper Text Markup Language

  3. Hyper Text Markinup Language

  4. All of the above


Correct Option: B

What is the syntax to write the HTML tags ?

  1. HTML

  2. "HTML"


Correct Option: A

What is the correct HTML tag for inserting an horizontal line?



Correct Option: B

How do you define font style of the text?


Correct Option: C

What is the file extension used for HTML file?

  1. .html

  2. .shtml

  3. .webpage

  4. .doc


Correct Option: A

To create a bulleted list use?


      Correct Option: D

      Which colors consist of equal amounts of all basic colors?

      1. purple, green, and red

      2. white, black and gray

      3. white,red,blue

      4. black, blue, and gray


      Correct Option: B

      AI Explanation

      To answer this question, we need to understand the concept of color mixing. When we mix different colors, we can create new colors. The primary colors, which are red, blue, and yellow, are the building blocks for all other colors. By mixing primary colors, we can create secondary colors, such as purple, green, and orange.

      Option A) Purple, green, and red - This option is incorrect because it includes red, which is a primary color and cannot be obtained by mixing other colors.

      Option B) White, black, and gray - This option is correct because it consists of equal amounts of all basic colors. White is the absence of color, black is the combination of all colors, and gray is a neutral color.

      Option C) White, red, and blue - This option is incorrect because it does not include equal amounts of all basic colors. It includes white, which is the absence of color, and red and blue, which are primary colors.

      Option D) Black, blue, and gray - This option is incorrect because it does not include equal amounts of all basic colors. It includes black, which is the combination of all colors, and blue and gray, which are not equal amounts of the basic colors.

      The correct answer is B. This option consists of equal amounts of all basic colors - white, black, and gray.

      Which is not valid HTML?


      Correct Option: A

      To which components does the Hibernate framework maps the Java classes with?

      1. Persistent Objects

      2. Database Tables

      3. Only a

      4. Both a & b


      Correct Option: B

      Which HTML attribute is used to define inline styles?

      1. styles

      2. class

      3. font

      4. style


      Correct Option: D

      What is the name of monitoring tool of Tibco?

      1. Tibco Hawk

      2. Tibco Eagle

      3. Tibco Vulture

      4. Tibco Bisness works


      Correct Option: A

      What is the correct CSS syntax for making all the

      elements bold?

      1. p {font-weight:bold}

      2. p {text-size:bold}


      Correct Option: A
      - Hide questions