its a ActionForm controller or model?
Answers were Sorted based on User's Feedback
Answer / ysr
ActionForm not Model component
It is just a View Data Transfer class
so it just part of Controller Even Struts API also
specifing this thing.
Model component nathing but where we are connecting to
database from our appliction
suppose if we are connecting DB from our Action class i.e
Model or if we are Connecting DB from EJB's or DAO i.e the
Model so FormBean is not Model component
| Is This Answer Correct ? | 16 Yes | 1 No |
Actually model is designed to handle business logic and
data.
Action Form is basically carrying the data from view to
Action Class,so it is coming under model.
| Is This Answer Correct ? | 16 Yes | 8 No |
Answer / sandya
Which one is correct in above two answers????
Please clarify. Iam getting confused
| Is This Answer Correct ? | 9 Yes | 1 No |
Answer / ysr
ActionForm not Model component
It is just a View Data Transfer class
so it just part of Controller Even Struts API also
specifing this thing.
Model component nathing but where we are connecting to
database from our appliction
suppose if we are connecting DB from our Action class i.e
Model or if we are Connecting DB from EJB's or DAO i.e the
Model so FormBean is not Model component
| Is This Answer Correct ? | 7 Yes | 1 No |
ActionForm is consider as Controller,Because
While ActionForm beans often have properties that
correspond to properties in your Model beans, the form
beans themselves should be considered a Controller
component. As such, they are able to transfer data between
the Model and View layers.
I hope it will helpful
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / mohan
I agree with Ramesh, Actionform is just a bean whr we will
be having setters and setters and some business logic and
validation rules, so its becomes Model, where as a Action
Class consists of ActionServlet, which as an intermediate
between Model and View(JSP), so the Action class becomes
the Controller... hope it helps...
| Is This Answer Correct ? | 6 Yes | 4 No |
Answer / raghavendra
Model are the classes that contains the code according to
the businees logic of the company.This logic is called
business logic.
In case of MVC 2 architecture, the contoller is a
combination of ActionServlet, Action classes and formbean
(ActionForm ) classes.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / saurabh gupta
Action Form is a part of view.....
it is basically a data container which works between view
and controller...for moder interaction we have value
objects and or business object which can be mapped to form
bean.
Acc to Struts Complete Ref. the form bean is a part of View.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / pope
Think of concept MVC. According to the Architecture(I hope
u know about this s***) for controller we have servlet
controller ,model as serve u with the business and
actionForm (think of action submit ) which is used for the
form validation which is far far away from other two
component
:-)
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / rasool
When you send request,request before gng to the Action classes,ActionForm(FormBean) will be executing and just it is just a View Data Transfer class.And it is not a business logic,just it is validating form fields.
Observe once struts config file
<action path="/test" name="formname" type="ActionClass"/>
First check path in actions and check if name attribute there or not if exists gng to the FormBean class not Actionclass.
So it is part of controller..
| Is This Answer Correct ? | 0 Yes | 0 No |
we have 7 jsp pages .At last page we have a submit button when we click it it will store all jsps data which we provide will store into database. when we starting providing data in jsp pages when we are at 3rd jsp at that time sessions timeout where the data will be store which we r provide in last two jsps?
What is token used for?
What is struts actionmapping?
how can i fetch combo box value into my DAO using struts 2?
Which tag is used to declare constants in struts xml?
Are struts thread safe?
What is the purpose of global-forwards tag in struct-config.xml?
Please can you tell me ,where can we used the MVC other than web applications.
what is the advantages and diadvantages of Struts?
What are action errors and error and what are the consequences they impose?
what is the difference between *.do & /do.*/? So what is the diffenence btn extension mapping & path mapping.What is those difference in work effect?
What are the applications of struts?