In Struts Programming which is the controller,which is the model(interms of action class,form bean,struts-config.xml,Jsp page)and which is the view exactly.

Showing Answers 1 - 17 of 17 Answers

prabhaker

  • Oct 31st, 2005
 

For above mentiones quetion ?In struts programming, controller is Action class,Model is  a formbean and view is Jsp

  Was this answer useful?  Yes

Chinna

  • Nov 1st, 2005
 

prabhaker Wrote: For above mentiones quetion ?In struts programming, controller is Action class,Model is  a formbean and view is Jsp
     Hi The Above Answer is wrong because Form bean is not a Model

  Was this answer useful?  Yes

gudlarajesh

  • Nov 4th, 2005
 

Struts follows mvc architecture.

M-model- form bean because if carries the data.

V- view- jsp forms the view object.

c-controller- action servlet is the controller.

If you want in detail contact me

  Was this answer useful?  Yes

Amol yadwadkar

  • Dec 20th, 2005
 

In Struts MVC:

Model:- Can say Action Class but not 100% or any hybernate beans ,etc...

Controller:- ActionServlet

View :- JSP

  Was this answer useful?  Yes

Dinesh Vishwakarma

  • Dec 21st, 2005
 

The actual ans. for this question in my view is :

View : jsp

Controller :ActionServlet

Model: Action Class is wrapper to Model, So it is not exactly a model but we can write some simple logic in it.

  Was this answer useful?  Yes

Sumanth Gummadi

  • Jan 5th, 2006
 

Struts frame work follows the MVC Architecure.

Normal JavaBeans,entityBeans....But FormBeans can't considered as Model objects in struts.They can be part of the Cotroller.Generally Actionform's can be used to tranfer the data between the Model and View.

Controller is a servlet of class ActionServlet This servlet is configured by defining a set of ActionMappings. An ActionMapping defines a path that is matched against the request URI of the incoming request and usually specifies the fully qualified class name of an Action class.

Views in struts framework is Jsp's,HTML,.........

  Was this answer useful?  Yes

Murali

  • Feb 11th, 2006
 

Struts does not provide any implementation for Model in MVC architecture. All it talks is only about Controller and View.

  Was this answer useful?  Yes

SubbaReddy

  • Feb 16th, 2006
 

Hi, You'r answer is 100% correct that FormBean cannot be act as model.Regards,Subbu

  Was this answer useful?  Yes

Jignesh

  • Feb 16th, 2006
 

Action Class is a part of Controller.

  Was this answer useful?  Yes

Nag

  • May 28th, 2006
 

In Struts,

View is the collaboration of Jsp's and ActionForm;

Controller part is played by ActionServlet by means of struts-config.xml

Model is external interface which will communicate with controller and also data can be accesed from ny DB.

  Was this answer useful?  Yes

Dnyaneshwar Dhumal

  • Sep 8th, 2006
 

the perfect answer is

1)Controller layer-
ActionForwards
ActionForm classes
ActionMappings
ActionServlet
Action classes
ActionErrors
MessageResources

2)View layer
JavaServer Pages, Velocity templates,
and other presentation
vehicles provided by the developer

3)Model layer
Generic DataSource
Other data services and APIs
provided by the developer

  Was this answer useful?  Yes

kynath

  • Sep 25th, 2006
 

Hi friend, i read all ur answers.Every body have diff answers. wellin my opinionM-model can be a database or formbean or a class which stores data.V-view is JSP,HTML,etcC-controller can be a action class or action servlet.wellbye

  Was this answer useful?  Yes

hari

  • Oct 30th, 2006
 

hi,

   Is it possible to write more than one controller.

regards...

hari

  Was this answer useful?  Yes

shankar

  • Jan 6th, 2007
 

Hi all !! My personal view about this topic is that :
View : would be the jsp page which take the data form the user
Model : Here we have the confilicting statements regarding this part : i would like to present my view on this :
The bussiness logic can be implemented as part of the Action class , However according to the instruction in the documentation on Struts , we should nt provide the bussiness logic as part of the Action class,
Instead of that we can provide a stand alone class , which would be responsible for implementing the bussiness logic , so that this class does not implement the Struts API and Servlet API , so that this part of code can be even used for a stand alone application.. Hence i would call this as Model calss
now Controller :
well i would call the rest of the class which is part of the struts as Controller classes
FormBean class and the Action class and the ActionServlet as part of Controller...
regards
shankar..

  Was this answer useful?  Yes

shankar reddy

  • Mar 22nd, 2007
 

what happens if there is more than one traffic controller in the junction, if signals are not working, coming to MVC architecture there will be only one controller is there .. that is ActionServlet.. every thing can occur in the presence of ActionServlet only thank you

  Was this answer useful?  Yes

Raman KUmar Singh

  • Oct 12th, 2007
 

As Per my understanding Controller is struts-config.xml which acts as a controller. i.e. Bridges the gap between Model and View.

Regards,
raman
FIS

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions