Apache Struts Framework
Covers Apache Struts framework fundamentals including Action classes, ActionForms, validation, configuration files, and framework internals.
Questions
In validate method of ActionForm , Parameters are ?
- HttpServletReuest reuest, HttpServletResponse response
- HttpServletReuest reuest,ActionMapping mapping
- ActionMapping mapping,HttpServletReuest reuest
- ActionMapping mapping,HttpServletResponse response
Other name of Struts 2 was
- WorkWeb 2
- WebWork 2
- Jstruts 2
- None of the above
The reset method on an ActionForm
- Sets all properties to their initial value
- Sets all properties to null
- Repopulates all properties from the request parameters
- None of the above
The validating init-param of the ActionServlet is used to
- Bypass calls to the ActionForm validate method
- Bypass validation of the Struts configuration file
- Generate an error message if an unknown message key is used
- None of Above
To prevent possible security issues with the html:password tag, you should
- Call the reset method if validation fails
- Set the tag's redisplay property to false
- Set the tag's reset property to false
- Use a plain html tag instea
To localize Validator forms, you can
- Create separate configuration files for each locale
- Specify a locale for a form-set
- Either A or B
- None of Above
Which method is necessary for Action class?
- valuator()
- reset()
- findForward()
- execute()
The parameters passed into execute() method is?
- ActionMapping mapping, ActionForm form, ServletRequest request, ServletResponse response.
- Mapping mapping, ActionForm form, ServletRequest request, ServletResponse response.
- ActionMapping mapping, Form form, ServletRequest request, ServletResponse response.
- ActionMapping mapping, ActionForm form, ServletRequest request, Response response.
Where key will generated?
- In Action class
- In ActionForm Class
- In ActionMapping Class
- In ActionServlet Class
The class instantiates ActionForm and puts it in appropriate scope based on scope tag?
- ActionServlet
- ReuestProcessor
- Action
- HttpReuest
reset() method signature in ActionForm ?
- public void reset(ActionMapping mapping, HttpServletReuest reuest)
- public ActionErrors reset(ActionMapping mapping, HttpServletReuest reuest)
- public ActionError reset(ActionMapping mapping, HttpServletReuest reuest)
- None of the above
Correct format?
- <message-resources parameter="application_resource"/>
- <message-resources file="application_resource"/>
- <message-resources include="application_resource"/>
- None of the above
Correct seuence of ActionForm execution?
- setter,reset
- Initialization,setter,reset
- setter,reset,Initialization
- reset,Initialization,setter
What does validate () method of ActionForm returns?
- ActionErrors
- ActionForward
- ActionMapping
- ActionError
If validate="false" in struts-config.xml action tag?
- Validate() method of ActionForm called automatically
- Validate() method of Action called automatically
- Validate() method of ActionForm Not Called automatically
- None Of the above
How to trigger validate () method of ActionForm?
- validate="false"
- validate="true"
- validate="yes"
- validate="no"
Struts Framework is well suited for application of ____ size
- Small
- Any
- Average
- Verysmall
To specify an ActionMapping to use when a request doesn't match any other mapping, you can
- Use an asterisk for the path property
- Set the "default" property of the mapping to "true"
- Set the "unknown" property of the mapping to "true"
- Set the "missing" init-param of the ActionServlet to the mapping's path
How can we retrieve keyed values from a previously defined resource bundle?
- Using <bean:message/>
- Using <bean:include />
- Using <bean:header />
- Using <bean:error />
Which is correct execute method of Action class?
- public void execute(ActionMapping mapping, ActionForm form, HttpServletReuest reuest, HttpServletResponse response) throws IOException
- public ActionForward execute (ActionMapping mapping, ActionForm form, ServletReuest reuest, ServletResponse response) throws Exception
- public ActionForward execute (ActionMapping mapping, ActionForm form, HttpServletReuest reuest, HttpServletResponse response) throws Exception
- public ActionForward execute (ActionMapping mapping, ActionForm form, ServletReuest reuest, ServletResponse response) throws SevletException, IOExpection.