Apache Struts Framework

Covers Apache Struts framework fundamentals including Action classes, ActionForms, validation, configuration files, and framework internals.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

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
Question 2 Multiple Choice (Single Answer)

Other name of Struts 2 was

  1. WorkWeb 2
  2. WebWork 2
  3. Jstruts 2
  4. None of the above
Question 3 Multiple Choice (Single Answer)

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
Question 4 Multiple Choice (Single Answer)

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
Question 5 Multiple Choice (Single Answer)

To prevent possible security issues with the html:password 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
Question 6 Multiple Choice (Single Answer)

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
Question 7 Multiple Choice (Single Answer)

Which method is necessary for Action class?

  1. valuator()
  2. reset()
  3. findForward()
  4. execute()
Question 8 Multiple Choice (Single Answer)

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.
Question 9 Multiple Choice (Single Answer)

Where key will generated?

  1. In Action class
  2. In ActionForm Class
  3. In ActionMapping Class
  4. In ActionServlet Class
Question 10 Multiple Choice (Single Answer)

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

  1. ActionServlet
  2. ReuestProcessor
  3. Action
  4. HttpReuest
Question 11 Multiple Choice (Single Answer)

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
Question 12 Multiple Choice (Single Answer)

Correct format?

  1. <message-resources parameter="application_resource"/>
  2. <message-resources file="application_resource"/>
  3. <message-resources include="application_resource"/>
  4. None of the above
Question 13 Multiple Choice (Single Answer)

Correct seuence of ActionForm execution?

  1. setter,reset
  2. Initialization,setter,reset
  3. setter,reset,Initialization
  4. reset,Initialization,setter
Question 14 Multiple Choice (Single Answer)

What does validate () method of ActionForm returns?

  1. ActionErrors
  2. ActionForward
  3. ActionMapping
  4. ActionError
Question 15 Multiple Choice (Single Answer)

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
Question 16 Multiple Choice (Single Answer)

How to trigger validate () method of ActionForm?

  1. validate="false"
  2. validate="true"
  3. validate="yes"
  4. validate="no"
Question 17 Multiple Choice (Single Answer)

Struts Framework is well suited for application of ____ size

  1. Small
  2. Any
  3. Average
  4. Verysmall
Question 18 Multiple Choice (Single Answer)

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
Question 19 Multiple Choice (Single Answer)

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

  1. Using <bean:message/>
  2. Using <bean:include />
  3. Using <bean:header />
  4. Using <bean:error />
Question 20 Multiple Choice (Single Answer)

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.