Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is the purpose of action servlet and action?

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


Please Help Members By Posting Answers For Below Questions

How can duplicate form submission be handled in struts 2?

934


What are the core classes of struts?

977


What is the purpose of @before annotation?

953


What is the purpose of form-be tag in struct-config.xml?

903


What is the default location of result pages and how can we change it?

956


What is the purpose of '@keyproperty'?

973


What are the two different types of validations that the validator framework supports?

895


Are struts thread safe?

922


What do you mean by actionservlet?

947


What are the steps involved in creating a strut application?

904


What is filter dispatcher in struts?

856


What does execandwait interceptor?

965


What are the some useful annotations introduced in struts2?

933


What is controller in struts2?

1038


What is the use of lookupdispatchaction?

966