what is diffrence between Dynaactionform,actionform and
Dynavalidateform

Answer Posted / mohd. irfan khan

All three are javaBean Class that can maintain the session
state for web application. The ActionForm object is
automatically populated on the server side with data
entered from a form on the client side.
An ActionForm/DynaValidateForm can have getter(),Setter(),
reset() and the validate() methods that can be defined in
your actionForm or in Action class itself. If any changes
are made to the properties, code need to be recompiled.

Her comes the DynaActionForm to rescue. It allows
properites to be specified in Struts-cofig.xml file there
by avoiding the recompilation of the code.Also there is no
need to have a Form Bean for every page that had getter and
setter method for each of the field on the page.

This is how it can be declared in struts config file:
<form-beans>
<form-bean name="employeeForm"
type="org.apache.struts.action.DynaActionForm">
<form-property name="fname" type="java.lang.String"/>
</form-bean>
</form-beans>

Is This Answer Correct ?    25 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

State an example of struts configuration file as an action parameter for action servlet.

751


How can we write our own interceptor and map it for action?

788


what is ACID test for fresh engineers??what is the pattern??

2564


How can we integrate log4j in Struts2 application?

774


What configuration files are used in struts?

724


Describe the two types of formbeans.

767


What is the difference between empty default namespace and root namespace?

790


What is struts and why it is used?

701


What is includeaction?

759


How can link tag’s action attribute be used?

701


What kind of mvc is struts 2?

763


What is the purpose of execute() method?

787


What configuration changes are required to use resource files in Struts?

777


Explain the components of struts?

732


How do I access token?

717