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 override the default error message that can come during file uploading process?

566


For a single Struts application, can we have multiple struts-config.xml files?

581


Is struts 1 still supported?

508


What are the reasons for an error message not being displayed while developing struts application?

547


What is the purpose of struts.properties in struct2?

523






What kind of mvc is struts 2?

551


What are struts in java?

500


What is action chaining ?

624


What is action class? What are the types of action class?

525


What is struts and why it is used?

491


What is structs 2 validation framework?

560


What is struts.devmode?

569


What are the aware interfaces in struts2?

546


What are the conditions for actionform to work correctly?

515


How nested beans can be used in Struts applications?

548