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

What is the purpose of @after?

0 Answers  


Hi Friends, am new to struts.I read that " you can store variables in xml file(properties file) and for future enhancements we just call properties file . Now i want to implement this , where can i call properties file to enhance my application. My question is where this properties file will be called.

1 Answers  


How display data base errors on web console by using the Struts Framework?

2 Answers  


What are the two different types of validations that the validator framework supports?

0 Answers  


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

0 Answers  






What are the custom tags?

0 Answers  


Wat is Difference between Mvc1 architecture and Mvc2 Architecture?

21 Answers   HCL, IBM, Sanyaa Infotech,


How do u provide security to ur project?(Banking domain project)

0 Answers   Polaris,


Which class of struts is responsible to converts data types from string and vice versa?

0 Answers  


State the procedure for using forward attribute of link tag’s.

0 Answers  


what r the disadvantages of MVC-2 Architecture?

2 Answers   Process IT,


How you will enable front-end validation based on the xml in validation.xml?

0 Answers  


Categories