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 to display validation errors on jsp page?

558


how to connect from struts to database through hibernet and where u can modify the class

2113


What are action errors?

556


How is the action mapping specified?

536


Is struts mvc framework?

468






What are the action classes in struts?

512


What are the steps used to setup dispatch action?

488


How many Action classes have been used in your project? Differences between struts 1.1 and 1.3?

2524


Explain the necessity of empty tag?

590


What do you mean by inner class and anonymous class?

584


What is container struts2?

519


What are the struts2 error message keys that can come during file uploading process?

600


What is the naming convention for a resource bundle file in struts2?

532


What is jakarta struts framework?

550


What are the conditions for actionform to work correctly?

513