Programming Tutorials

Interview Question: Do ActionForms have to be true JavaBeans?

By: Ash in Interview Tutorials on 2008-08-13  

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.

 

 

 

 





Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in Interview )

What is transient variable?

What is the difference between interface and abstract class?

Interview Question: Do ActionForms have to be true JavaBeans?

What is the difference between Session Bean and Entity Bean?

What are the services provided by a J2EE container?

Interview Question: What is the difference between EAR, JAR and WAR file?

What are the call back methods in Session bean?

Interview Question: What is difference between EJB 1.1 and EJB 2.0?

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

What is Collection API?

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

Interview Question: What are the call back methods in Entity bean?

What is difference between Java Bean and Enterprise Java Bean?

Interview Question: What is EJB container?

Question: Explain the life-cycle methods in JSP?

Latest Articles (in Interview)