Interview Question: Do ActionForms have to be true JavaBeans?

By: Ash Printer Friendly Format    

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.

 

 

 

 

Ask a Question



Most Viewed Articles (in Interview )

Interview Question: What is ActionForm?

Interview Question: Is there a particularly good IDE to use with Struts ?

Interview Question: What is lazy loading?

Interview Question: What is re-entrant. Is session beans reentrant. Is entity beans reentrant?

Question: What is an Expression tag in JSP?

Why J2EE is suitable for the development distributed multi-tiered enterprise applications?

What are the services provided by a container?

Interview Question: What is Struts?

Interview Question: How is the MVC design pattern used in Struts framework?

Interview Question: Who makes the Struts?

Interview Question: Why it is called Struts?

Interview Question: What is Action Class?

Interview Question: Write code of any Action Class?

Interview Question: What is Struts Validator Framework?

Interview Question: Why do we need Struts?

Latest Articles (in Interview)

Comment on this tutorial