tell me struts flow ?

Answers were Sorted based on User's Feedback



tell me struts flow ?..

Answer / mukesh

Above answer is correct but more clear is

supose we having Http:/myhost/authorize.do


1. server configure to pass *.do extension to
org.apache.struts.action.ActionServlet via web.xml

2. Action servlet object inspect the uri and try to
match against ActionMapping located in
struts-configuration.xml

3. if intance of appropriate action found it call
perform() .
4. action object handle request and returns next view..

Is This Answer Correct ?    6 Yes 0 No

tell me struts flow ?..

Answer / a.v.satyanarayana

Struts follows mvc pattern.

Model ; which is represented as bussiness components.

View: at view level we have JSP's

Controler: Actionservlet given by the frame work.

This frame work mainly depends upon two xml files.

1) is web.xml where we are moniteriong the controlerpart.

2) struts.config.xml where action classes are congured.

when a request is submitted, this request is handelled by
the controller.And the actionservlet internally checks into
the struts config.xml and identifies the coresponding
action class.

Instantiate that action class and execute the bussiness
logic in that action class and forwards the request to the
required JSP.

Is This Answer Correct ?    4 Yes 0 No

tell me struts flow ?..

Answer / ram-sd softech

1. When we start a web application based on struts the web
container creates a
servlet object based on
2. The web container creates the request and response
objects.
3. The web container calls the service method of Action
Servlet by passing the request and the response objects.
4. The Code of Action Servlet checks the struts-
config.xml with path /action at action mappings tag we
discussed how is that as earlier (page-8). Now if it is
there then it creates the ActionOne Object then after it
calls the execute method of ActionOne class.
5. After that it forwards to jsp.If any problem eraises
it shows Exception.
6. After that the Web container will start the execution
of .jsp as we discussed in JSP’s.

Is This Answer Correct ?    2 Yes 0 No

tell me struts flow ?..

Answer / venu

When a client makes a request ,The request goes to the
action servlet as we configured in web.xml (for every
request
*.do----->org.apache.struts.action.ActionServlet.).then
action servlet will read struts-config.xml file and it wil
create module config object and then give it(Module config
obkect) to RequestDispatcher(by calling process() method in
request dispatcher .I mean deligating the request to RD by
doing this.Process method is designed as Chain of
responsability design pattern).After deligating the request
to RD by AS ,AS will not do any thing .from here onwards
Request Dispatcher wil take careof every thing like process
the reuest and send the response.RequestDispacher wil check
whether formbean object existed for this form ,if it is
existed it wil reset the form bean by calling reset()
method of form bean.reset() will reset the new values in the
formbean object.I mean in the form bean object is initiating
with the null values when it is created(it creates when
client makes a request itself).then RD wil check whether the
validate attribute is true or not .if it is true then it
does the validation by calling the method validate().This
method wil return
ActionErrors object.After executing the validate method RD
wil check whether the ActionError object is null or not.If
it is not null,then it wil forward the request to Error.jsp
as we configured in struts-config.if it is null, then it wil
cal the its respective action class as we configured in
struct-config.xml and then action class wil cal bussiness
class method .bussiness class method wil cal the DataAccess
layer class method .The response send it to bussiness class
method.bussinesss class method wil send the response to
action class.action class method wil return the response to
RD.then RD send the response to Success.jsp.

Is This Answer Correct ?    0 Yes 0 No

tell me struts flow ?..

Answer / guest

asd

Is This Answer Correct ?    0 Yes 8 No

Post New Answer

More Struts Interview Questions

How action-mapping tag is used for request forwarding in struts configuration file?

0 Answers  


What are the classes used as part of struts framework ?

0 Answers  


when connecting with the database,if database server is down,ho can we handle this exception in struts,how can we send error message to the user?

4 Answers   Wipro,


How to combine the struts with velocity template?

0 Answers  


How to pass runtime Parameter in Struts1.2?

2 Answers  






What is execute method in struts?

0 Answers  


Can we use struts and spring together?

0 Answers  


What is controller in struts ?

0 Answers  


How do you know what to give for the "path " under in struts-config.xml ?

1 Answers  


Whats the difference between the default namespace and the root namespace?

0 Answers  


Explain integrate log4j in struts2 application?

0 Answers  


How to set email notification using struts.Plz give the example code?

5 Answers   HCL,


Categories