Why in struts 1.3 we have two separated classes for handling request :
— ActionServlet which intercept the request and calls RequestProcessors process method for further processing
–RequestProcessor read XML file, find the appropriate Handler and handles request
My question is why this are two different classes?
I tried to search on the net and books but did not got any answer.
Can any one have any idea? please let me know
ActionServletbasically reads yourstruts-config.xmland creates aModuleConfig. ThisModuleConfigis a Object representation of yourstruts-config.xml. ActionServlet just passes yourHttpServletRequestandHttpSerlvetResponseto theRequestProcessor.The
RequestProcessorbasically identifies theActionfrom the request (through theModuleConfighelper) create anActionMapping(based on the call one made) and performs executes the necessary action to retrieve anActionForward. From theActionForward, it delegates your request and response to it and that’s the whole Struts workflow.Basically, the heart of Struts is through the
RequestProcessor. TheActionServletjust initializes Struts as well as passes the request and response to theRequestProcessor.