Well I want to study Struts so I am going to begin with Struts 1, I would like to know the general flow. What files are required?
Whats the function of struts-config.xml
action="login.do"
. the container will call to web.xml
. in that
web.xml
there are two sections servlet And servlet mapping*.do
in the url-pattern. if it found to
take the name of servlet. and check the corresponding class. in the
servlet section. that class is ActionServlet
.RequestPrecessor
class instanceService(req,res) RequestPrecessor rp = new RequestPrecessor();
RequestProcessor
class through the
instance rp.process(req,res)
Inside that condition there are 6 steps are processing
Struts- Config.xml
. it
will keep all details of the action mapping path, value, type
forward, validation=true/false
, input
="*.jsp"
etc these r created instanceActionMapping
instance the ris mention or not the
validate =true/false
if false it will not execute the this step else
it will execute this step.ActionErrors
instance. if it is not empty. it will go to error page
other wise it will got to corresponding page. else if it is empty
if will go further and display corresponding value of page in jsp
view.This is struts flow.