QUIZ: Struts in Action

 

Quizzes Index


Duke

This quiz is based on the book excerpt Struts in Action, a comprehensive introduction to the Struts framework. Review the book excerpt and take the quiz. Test your Struts knowledge such as how to localize Tiles or Validator forms.

Choose the best answer(s) for each question, then click Submit to see how you scored.

 

  1. Struts was first developed
     A. in an online exchange between several open source developers
     B. over a long holiday weekend
     C. as a commercial package
  2. The reset method on an ActionForm
     A. Sets all properties to their initial value
     B. Sets all properties to null
     C. Repopulates all properties from the request parameters
     D. None of the above
  3. Each Struts Action element is uniquely identified by its
     A. Input attribute
     B. Name attribute
     C. Page attribute
     D. Path attribute
  4. The name of the Application Resources file is set by the servlet init-param named
     A. application
     B. resources
     C. ApplicationResources
     D. messages
  5. The validating init-param of the ActionServlet is used to
     A. Bypass calls to the ActionForm validate method
     B. Bypass validation of the Struts configuration file
     C. Generate an error message if an unknown message key is used
  6. To specify an ActionMapping to use when a request doesn't match any other mapping, you can
     A. Use an asterisk for the path property
     B. Set the "default" property of the mapping to "true"
     C. Set the "unknown" property of the mapping to "true"
     D. Set the "missing" init-param of the ActionServlet to the mapping's path
  7. If you have created a custom ActionMapping subclass with the property "service", you can initialize the value to " selectRecord" using
     A. <init-property name="service" value="selectRecord"/>
     B. <set-property property="service" value="selectRecord"/>
     C. <put-field key="service" content="selectRecord"/>
  8. In Struts 1.1, you can change how Struts populates a form by
     A. Overriding the populate method of the ActionForm
     B. Overriding the processPopulate method of the Request Processor
     C. Overriding the populateBean method of the ActionMapping
  9. The <bean:write> tag is:
     A. Always converts HTML markup to entity equivalents, like &lt;
     B. Never converts HTML markup to entity equivalents
     C. Converts markup when filter=true
     D. Converts markup when markup=false
  10. To prevent possible security issues with the <html:password> tag, you should
     A. Call the reset method if validation fails
     B. Set the tag's redisplay property to false
     C. Set the tag's reset property to false
     D. Use a plain html tag instead
  11. To localize Tiles, you can
     A. Create separate configuration files for each locale
     B. Specify an locale for a definition
     C. Either A or B
  12. To localize Validator forms, you can
     A. Create separate configuration files for each locale
     B. Specify a locale for a form-set
     C. Either A or B
  13. From a MVC perspective, Struts provides the
     A. Model
     B. View
     C. Controller

Left Curve
Java SDKs and Tools
Right Curve
Left Curve
Java Resources
Right Curve
JavaOne Banner
Java 8 banner (182)