ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
   
 
Categories  >>  Software  >>  Java Related  >>  Java J2EE  >>  Struts
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
what is diffrence between Dynaactionform,actionform and 
Dynavalidateform
 Question Submitted By :: Jawahar
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is diffrence between Dynaactionform,actionform and Dynavalidateform
Answer
# 1
All three are javaBean Class that can maintain the session
state for web application and the ActionForm object is
automatically populated on the server side with data
entered from a form on the client side. but an
--->ActionForm(DynaValidateForm) can have getters(),Setters
(),reset() and the validator() methods.

--->DynaActionForm should be given in Struts-cofig.xml as
follows
<form-beans>
<form-bean name="employeeForm"
type="org.apache.struts.validator.DynaValidatorForm"
<form-property name="dispatch" type="java.lang.String"/>
</form-bean>
</form-beans>
 
Is This Answer Correct ?    20 Yes 4 No
Jane Priscilla
 
  Re: what is diffrence between Dynaactionform,actionform and Dynavalidateform
Answer
# 2
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 ?    23 Yes 4 No
Mohd. Irfan Khan
 
 
 
  Re: what is diffrence between Dynaactionform,actionform and Dynavalidateform
Answer
# 3
Dynaactionform & actionform have getters & setters and
validates.
ActionForm object is automatically populated on the server
side with data.
 
Is This Answer Correct ?    2 Yes 8 No
Hazarath Kumar
 
  Re: what is diffrence between Dynaactionform,actionform and Dynavalidateform
Answer
# 4
These are form beans which simplfy the process of handling
the forms
Form Beans contains
1. instance variables
2. setters
3. getters
4. reset method
5. validate method
For Action Form the all above 5 properties are manditory
For DynaActionForm above 1,2,3 properties are not needed
(here we provide the information in struts-config.xml)
For DynaValidation Form above 4,5properties are not needed
 
Is This Answer Correct ?    9 Yes 4 No
Ram-sd Softech
 
  Re: what is diffrence between Dynaactionform,actionform and Dynavalidateform
Answer
# 5
In case of the ActionForm user has to write the setters and
getters for every jsp page(request).supoose we have 10
jsps then we have to write10 Action Forms.Dyna Action is a
Generic action form which represents a form.

In DynaActionForm :properties of the form are decided at
the time of deplying the application.

DynaActionForm eliminates this burden and creates the form
bean itself. This way we don't have to write setters and
getters...infact we don't have to give any bean class. To
use DynaAction Form, we have to declare the form bean as a
DynaActionForm Type in struts-config.xml. You will have to
declare the properties and their type too.
 
Is This Answer Correct ?    6 Yes 1 No
Ramkiran
 
  Re: what is diffrence between Dynaactionform,actionform and Dynavalidateform
Answer
# 6
how we can used setter getter reset and validate() in
struts give one Example.plz soon.
 
Is This Answer Correct ?    1 Yes 1 No
A.jyotsna
 
  Re: what is diffrence between Dynaactionform,actionform and Dynavalidateform
Answer
# 7
ActionForm will populate the properties depending on the
respective JSP fields.In this we can specify the validate()
method (if required) for validations or else you can use
ActionErrors for validating..

DynaActionForm has to be defined in Struts-config.xml and
it may have many property fields. We can use this form for
many no.of JSPs.Single dynaActionForm can serve for many
number of JSPs.

DyanValidateForm is same as DynaActionForm but we no need
to specify explicitly for the Validations. If we define a
DynaActionForm as DynaValidateForm, then it will look up of
rthe validations.

One more is there DynaValidatorActionForm which will allow
you to specify the path variable of <action> tag in
Validator.xml where as in DynaValidateForm will take
formname.
 
Is This Answer Correct ?    5 Yes 0 No
Madhukiran
 
  Re: what is diffrence between Dynaactionform,actionform and Dynavalidateform
Answer
# 8
ActionForm
This class must be subclassed in order to be instantiated.
Subclasses should provide property getter and setter
methods for all of the bean properties they wish to expose,
plus override any of the public or protected methods for
which they wish to provide modified functionality.

DynaActionForm
Specialized subclass of ActionForm that allows the creation
of form beans with dynamic sets of properties, without
requiring the developer to create a Java class for each
type of form bean.

DynaValidatorForm
This class extends DynaActionForm and provides basic field
validation based on an XML file. The key passed into the
validator is the action element's 'name' attribute from the
struts-config.xml which should match the form element's
name attribute in the validation.xml.

Differences
ActionForm does not create getters and setters like we
cannot write <form-bean name="loginForm"
type="org.apache.struts.action.ActionForm"> in struts-
config.xml.

DynaActionForm cannot be used if we want validation in that
case DynaValidatorForm can be used.
 
Is This Answer Correct ?    3 Yes 1 No
Labourer In An Mnc
 

 
 
 
Other Struts Interview Questions
 
  Question Asked @ Answers
 
what is project architecture?give brief explanation about project architecture? CTS2
when we enter the data in the form how it is stored in formbean class setter and getter methods? Wipro1
where you will implement the tiles in struts? Wipro2
is it necessary to write struts-confing.xml ,what tags are important in that xml file?  2
life cycle of struts? HCL13
Can we have different controllers in one struts app? Accenture6
explain the Struts flow? Wipro4
Can we write our own ActionServlet for front controller of Struts Applications? NIIT2
project architechture in java IBM3
wat happen when the connection is nt closed in jdbc n what vl happen when i interchange in executequery n execute statements  2
i have 500 jsps in my application,and i have same forward name for each jsp,so it lokks in strutsconfig.xml,from 1 to 500,but i want send 498 page directly,how can i cingigure my application TCS2
drawback of Validation Framework where and how to write the connection pool object in the programe how to debug the programe and application in struts without using eclips  1
 
For more Struts Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2012  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com