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
What is the configuration files used in struts?
What is Struts2?
What is struts2 in java?
What are struts in java?
Briefly tell the two kinds of form beans.
Which class of struts is responsible to converts data types from string and vice versa?
List some struts tag libraries?
How can we display validation errors on jsp page?
Mark the differences between html tags and strut specific html tags.
What is package name in struts xml?
Can you explain the directory structure for a struts folder in brief ?
What are the core components of a struct2 based application?
What is interceptor in Struts2?
Explain the core end goal while using java struts?
Can we use struts and spring together?