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 the difference between EAR, JAR and WAR file?

Can Entity Beans have no create() methods?

What types of comments are available in the JSP?

Interview Question: What is Struts?

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

Interview Question: If the framework doesn't do what I want, can I request that a feature be added?

Interview Question: What is the difference between sessioncontext and entitycontext?

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

Interview Question: What is deployment descriptor?

Interview Question: What is the difference between Message Driven Beans and Stateless Session beans?

What do you understand by a J2EE module?

What are the services provided by a container?

What are types of J2EE clients?

What is J2EE Connector architecture?

What is similarities/difference between an Abstract class and Interface?

Latest Articles (in Interview)

Comment on this tutorial