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

Give an alternative way to protect jsp’s with not much features from direct access.

546


How many servlet controllers are used in a Struts Application?

498


What is declarative exception handling in struts?

544


What is s token?

526


How can we handle exceptions thrown by application in Struts2?

524






What is the forward action utilized for?

542


What is the purpose of @emailvalidator?

551


What does i18n interceptor?

565


What is execute method in struts?

482


Name the different types of actions found in struts.

544


What is the purpose of @before?

537


What are the benefits of Interceptors in Struts2?

636


How is token generated?

521


How to handle exceptions in structs?

557


Describe the basic steps used to create a tiles application?

543