Struts%20Interview%20Questions%20and%20Answers
Question: Do ActionForms have to be true JavaBeans?Answer: The utilities that Struts uses (Commons-BeanUtils since 1.1) require that ActionForm properties follow the JavaBean patterns for mutators and accessors (get*,set*,is*). Since Struts uses the Introspection API with the ActionForms, some containers may require that all the JavaBean patterns be followed, including declaring "implements Serializable" for each subclass. The safest thing is to review the JavaBean specification and follow all the prescribed patterns.Since Struts 1.1, you can also use DynaActionForms and mapped-backed forms, which are not true JavaBeans. For more see ActionForm classes in the User Guide and Using Hashmaps with ActionForms in this FAQ. |
Is it helpful?
Yes
No
Most helpful rated by users:
- What is Struts?
- What helpers in the form of JSP pages are provided in Struts framework?
- How is the MVC design pattern used in Struts framework?
- Who makes the Struts?
- Why it called Struts?