Multiple choice technology web technology

Which of the following statements are true with respect to Struts-Config.xml?

  1. The name attribute of action tag, specifies the action name

  2. Only one controller can be defined for a module in struts application

  3. Struts configuration files should be placed only inside WEB-INF folder or its sub folders

  4. The <exception> tag can be used to forward user to a specific view in case of an exception.

Reveal answer Fill a bubble to check yourself
B,D Correct answer
Explanation

Statement B is true: Each Struts module can have only one controller (RequestProcessor) defined. Statement D is true: The tag in struts-config.xml allows configuring exception handling, including forwarding to specific error views when exceptions occur. Statement A is false: The 'name' attribute of specifies the form bean name, not the action name (the action's logical name is the 'path' attribute). Statement C is false: While WEB-INF is recommended for security, config files can be placed elsewhere if properly configured in web.xml.