0

web technology Online Quiz - 174

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

Struts was first developed

  1. in an online exchange between several open source developers

  2. over a long holiday weekend

  3. as a commercial package

  4. none


Correct Option: B

The reset method on an ActionForm

  1. Sets all properties to their initial value

  2. Sets all properties to null

  3. Repopulates all properties from the request parameters

  4. none


Correct Option: D

Each Struts Action element is uniquely identified by its

  1. Input attribute

  2. Page attribute

  3. Name attribute

  4. Path attribute


Correct Option: D

The name of the Application Resources file is set by the servlet init-param named

  1. application

  2. resources

  3. ApplicationResources

  4. messages


Correct Option: A

The validating init-param of the ActionServlet is used to

  1. Bypass calls to the ActionForm validate method

  2. Bypass validation of the Struts configuration file

  3. Generate an error message if an unknown message key is used

  4. none


Correct Option: B

AI Explanation

To answer this question, you need to understand the purpose of the init-param in the ActionServlet configuration.

The ActionServlet is a controller component in the Struts framework that handles incoming requests and dispatches them to appropriate actions. It can be configured using the web.xml file.

The init-param element in the web.xml file allows you to specify initialization parameters for the ActionServlet. These parameters can be used to customize the behavior of the ActionServlet.

Option A) Bypass calls to the ActionForm validate method - This option is incorrect because the validate method of the ActionForm is not affected by the init-param of the ActionServlet. The validate method of the ActionForm is responsible for validating the form inputs.

Option B) Bypass validation of the Struts configuration file - This option is correct. The init-param of the ActionServlet can be used to bypass the validation of the Struts configuration file. By setting this parameter to true, the ActionServlet will skip the validation of the Struts configuration file during initialization. This can be useful in certain scenarios where you want to disable the validation temporarily.

Option C) Generate an error message if an unknown message key is used - This option is incorrect. The init-param of the ActionServlet is not related to generating error messages for unknown message keys. The handling of message keys is typically done by the Struts message resources.

Option D) none - This option is incorrect. The init-param of the ActionServlet can be used to configure specific behavior, so it is not accurate to say that it has no purpose.

The correct answer is B) Bypass validation of the Struts configuration file. This option is correct because the init-param of the ActionServlet can be used to bypass the validation of the Struts configuration file during initialization.

To specify an ActionMapping to use when a request doesn't match any other mapping, you can

  1. Use an asterisk for the path property

  2. Set the "default" property of the mapping to "true"

  3. Set the "unknown" property of the mapping to "true"

  4. Set the "missing" init-param of the ActionServlet to the mapping's path


Correct Option: C

If you have created a custom ActionMapping subclass with the property "service", you can initialize the value to "selectRecord" using

  1. none


Correct Option: B

In Struts 1.1, you can change how Struts populates a form by

  1. Overriding the populate method of the ActionForm

  2. Overriding the processPopulate method of the Request Processor

  3. Overriding the populateBean method of the ActionMapping

  4. None


Correct Option: B

AI Explanation

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

Option A) Overriding the populate method of the ActionForm - This option is incorrect. In Struts 1.1, the populate method of the ActionForm is used to populate the form properties with the request parameters. However, this method is not used to change how Struts populates a form.

Option B) Overriding the processPopulate method of the Request Processor - This option is correct. In Struts 1.1, you can change how Struts populates a form by overriding the processPopulate method of the Request Processor. The Request Processor is responsible for populating the form properties with the request parameters, and by overriding this method, you can customize the population logic.

Option C) Overriding the populateBean method of the ActionMapping - This option is incorrect. The populateBean method of the ActionMapping class is not used to change how Struts populates a form in Struts 1.1.

Option D) None - This option is incorrect. As mentioned above, in Struts 1.1, you can change how Struts populates a form by overriding the processPopulate method of the Request Processor.

The correct answer is B) Overriding the processPopulate method of the Request Processor. This option is correct because it allows you to customize how Struts populates a form in Struts 1.1.

The tag is:

  1. Always converts HTML markup to entity equivalents, like <

  2. Never converts HTML markup to entity equivalents

  3. Converts markup when filter=true

  4. Converts markup when markup=false


Correct Option: C

To prevent possible security issues with the tag, you should

  1. Call the reset method if validation fails

  2. Set the tag's redisplay property to false

  3. Set the tag's reset property to false

  4. Use a plain html tag instead


Correct Option: B

What are all the valid queries to rename a table employee to employee_copy?

  1. rename table employee as employee_copy

  2. rename employee to employee_copy

  3. alter employee rename to employee_copy

  4. alter table employee rename as employee_copy

  5. alter table employee rename to employee_copy


Correct Option: B,E

Which two are true about the JSTL core iteration custom tags?

  1. It may iterate over arrays, collections, maps and strings.

  2. The body of the tag may contain EL code, but not scripting code.

  3. When looping over collections, a loop status object may be used in the tag body.

  4. It may iterate over a map, but only the key of the mapping may be used in the tag body.

  5. When looping over integers (for example begin1='1' end='10'), a loop status object may not be used in the tag body.


Correct Option: A,C

Which key combination opens the Calendar view?

  1. Ctrl+1

  2. Ctrl+2

  3. Ctrl+3

  4. Ctrl+4


Correct Option: B

Which key combination opens a new meeting?

  1. Ctrl+Shift+Q

  2. Ctrl+Shift+N

  3. Ctrl+Shift+H

  4. Ctrl+Shift+S


Correct Option: A

The .NET Framework provides a runtime environment called..... ?

  1. RMT

  2. CLR

  3. CMT

  4. RC


Correct Option: B

Find the term: The .NET framework which provides automatic memory management using a technique called ______________ ?

  1. serialization

  2. garbage collection

  3. assemblies

  4. overriding


Correct Option: B

AI Explanation

To answer this question, you need to understand memory management in the .NET framework. Let's go through each option to understand why it is correct or incorrect:

Option A) Serialization - This option is incorrect because serialization is a technique used for converting objects into a format that can be stored or transmitted, it is not directly related to memory management.

Option B) Garbage collection - This option is correct because the .NET framework provides automatic memory management using a technique called garbage collection. Garbage collection is a process where the .NET runtime automatically identifies and frees up memory that is no longer being used by the program.

Option C) Assemblies - This option is incorrect because assemblies are the building blocks of .NET applications, containing the compiled code, metadata, and resources that make up the application. It is not directly related to memory management.

Option D) Overriding - This option is incorrect because overriding is a concept in object-oriented programming that allows a subclass to provide a different implementation of a method that is already defined in its superclass. It is not directly related to memory management.

The correct answer is B) garbage collection. This option is correct because the .NET framework provides automatic memory management using a technique called garbage collection.

WSDL stands for _________________ ?

  1. Web Server Description Language

  2. Web Server Descriptor Language

  3. Web Services Description Language

  4. Web Services Descriptor Language


Correct Option: C

Which of the following is FALSE?

  1. ASP.NET applications run without a Web Server

  2. ASP+ and ASP.NET refer to the same thing

  3. ASP.NET is a major upgrade over ASP

  4. None of the Above


Correct Option: D

The type of code found in Code-Behind class is ________ ?

  1. Server-side code

  2. Client-side code

  3. Both A) and B)

  4. None of the above


Correct Option: A

Suppose a .NET programmer wants to convert an object into a stream of bytes then the process is called ______________ ?

  1. Serialization

  2. Threading

  3. RCW

  4. AppDomain


Correct Option: A
- Hide questions