Answer Posted / k@r/\/@d
Most of whats said is correct...
The class org.apache.struts.action.ActionServlet is called
ActionServlet.This class plays the role of controller. All
the requests to the server goes thorugh the controller. It
is responsible for handling all the requests.
----> (Action is part of Model.) --> Its still a part of
controller as it directs you to the appropriate business
processor class (which is a part of model).
The purupose of Actionclass is to
translate the HttpServletRequest to the business logic. To
use Action we need to subclass and over(RID)e the execute()
method.
all database and business processing are done here. -->
These CAN be done here, but shouldn't as it would defeat the
purpose of having a seperate Model layer i.e. Business
Layer. The request must be directed to a business class
which would process the request, perform the neccesary
Database operations if any, wrap the response in a response
object and send it back to the action class to be directed
to the next view by means of mapping.findForward...
Thats my take on this...
| Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
How you will make available any message resources definitions file to the struts framework environment?
How many action classes can be used in struts application?
What's mvc pattern ?
What is the design role played by struts?
What are the pros of struts 2?
Give the details of xml files used in validator framework?
How is the action mapping specified?
What is the difference in using Action interface and ActionSupport class for our action classes, which one you would prefer?
How can we handle exceptions thrown by application in Struts2?
Whats the difference between the default namespace and the root namespace?
How the exceptions are handled in struts?
Can you explain the directory structure for a struts folder in brief ?
What is action class? What are the types of action class?
What is action servlet in struts?
List some bundled validators?