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 )

Question: What is a Hidden Comment in JSP?

What types of comments are available in the JSP?

Tell me something about J2EE component?

The output of System.out.println(5<<2) in Java

What is Collection API?

Interview Question: Do ActionForms have to be true JavaBeans?

Name the containers which uses Border Layout as their default layout?

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

What is the difference between Session Bean and Entity Bean?

What is the difference between jsp:include page and @ include file?

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

Interview Question: What is Action Class?

The output of System.out.println(5>>2) in Java

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

What do you understand by JTA and JTS?

Latest Articles (in Interview)