0
Alien head

programming languages Online Quiz - 221

Description: programming languages Online Quiz - 221
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

Which is correct execute method of Action class?

  1. public void execute(ActionMapping mapping, ActionForm form, HttpServletReuest reuest, HttpServletResponse response) throws IOException

  2. public ActionForward execute (ActionMapping mapping, ActionForm form, ServletReuest reuest, ServletResponse response) throws Exception

  3. public ActionForward execute (ActionMapping mapping, ActionForm form, HttpServletReuest reuest, HttpServletResponse response) throws Exception

  4. public ActionForward execute (ActionMapping mapping, ActionForm form, ServletReuest reuest, ServletResponse response) throws SevletException, IOExpection.


Correct Option: C

How can we retrieve keyed values from a previously defined resource bundle?

  1. Using

  2. Using

  3. Using

  4. Using


Correct Option: A

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

Struts Framework is well suited for application of ____ size

  1. Small

  2. Any

  3. Average

  4. Verysmall


Correct Option: B

How to trigger validate () method of ActionForm?

  1. validate="false"

  2. validate="true"

  3. validate="yes"

  4. validate="no"


Correct Option: B

If validate="false" in struts-config.xml action tag?

  1. Validate() method of ActionForm called automatically

  2. Validate() method of Action called automatically

  3. Validate() method of ActionForm Not Called automatically

  4. None Of the above


Correct Option: C

What does validate () method of ActionForm returns?

  1. ActionErrors

  2. ActionForward

  3. ActionMapping

  4. ActionError


Correct Option: A

Correct seuence of ActionForm execution?

  1. setter,reset

  2. Initialization,setter,reset

  3. setter,reset,Initialization

  4. reset,Initialization,setter


Correct Option: B

Correct format?

  1. None of the above


Correct Option: A

reset() method signature in ActionForm ?

  1. public void reset(ActionMapping mapping, HttpServletReuest reuest)

  2. public ActionErrors reset(ActionMapping mapping, HttpServletReuest reuest)

  3. public ActionError reset(ActionMapping mapping, HttpServletReuest reuest)

  4. None of the above


Correct Option: A

The class instantiates ActionForm and puts it in appropriate scope based on scope tag?

  1. ActionServlet

  2. ReuestProcessor

  3. Action

  4. HttpReuest


Correct Option: B

Where key will generated?

  1. In Action class

  2. In ActionForm Class

  3. In ActionMapping Class

  4. In ActionServlet Class


Correct Option: C

The parameters passed into execute() method is?

  1. ActionMapping mapping, ActionForm form, ServletRequest request, ServletResponse response.

  2. Mapping mapping, ActionForm form, ServletRequest request, ServletResponse response.

  3. ActionMapping mapping, Form form, ServletRequest request, ServletResponse response.

  4. ActionMapping mapping, ActionForm form, ServletRequest request, Response response.


Correct Option: A

Which method is necessary for Action class?

  1. valuator()

  2. reset()

  3. findForward()

  4. execute()


Correct Option: D

To localize Validator forms, you can

  1. Create separate configuration files for each locale

  2. Specify a locale for a form-set

  3. Either A or B

  4. None of Above


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 instea


Correct Option: B

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 of Above


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 of the above


Correct Option: D

Other name of Struts 2 was

  1. WorkWeb 2

  2. WebWork 2

  3. Jstruts 2

  4. None of the above


Correct Option: B

In validate method of ActionForm , Parameters are ?

  1. HttpServletReuest reuest, HttpServletResponse response

  2. HttpServletReuest reuest,ActionMapping mapping

  3. ActionMapping mapping,HttpServletReuest reuest

  4. ActionMapping mapping,HttpServletResponse response


Correct Option: C
+ View questions