life cycle of struts?
Answers were Sorted based on User's Feedback
Answer / mahipalreddy
There is no perticular life cycle of struts , but it
basically depending on servelet almost it following
servelet lifecyle, they developed by servlet lifecycle only
and they added security methods.
| Is This Answer Correct ? | 0 Yes | 2 No |
Please find the below ural for struts life cycle digram.
http://www.ibm.com/developerworks/java/library/j-seam1/lifecycle.gif.
suppose one form having name,age two fields and one submit
button. when ever enter the two fields and submit button.
the request goes to web.xml. the request check in the struts
config.file. the related form bean and action class will be
executing. then related redirect page.
| Is This Answer Correct ? | 5 Yes | 8 No |
Answer / kartheeswari
There are many steps,
1. After getting the request from the client, the
ActionServlet invokes the goGet() or doPost() method, in
which there is a invokation of process() method.This method
desides the module.
2. Action servlet dispatches the request to RequestProcesor
class which does some core works of ActionServlet.Then
invokes the appropriate Action class.
3. Action class does main business logic and data accessing
(communicating with Moedl) thru execute() method and which
returns the ActionForward object.
4. In b/w the form field validations happens in form bean.
5. Depends upon the value of ActionForward object the view
is decided to display.(output)
4. Form bean is invoked for form field validation,
| Is This Answer Correct ? | 27 Yes | 36 No |
process of creating , invoking , destroying the servlet is
known as "life cycle of struts". here three methods are
involved
1.init() :
Total intialization part of servlet ll be there in this .
2.service() :
Actual Bussiness code ll be there in this method
3.destroy() :
just destroying the servlet .
| Is This Answer Correct ? | 24 Yes | 117 No |
What is Portlet???? when,where and why we use it ??
3 Answers Infotech, Rebaca, Wipro,
Can we handle exceptions in Struts programmatically?
What is the purpose of @requiredstringvalidator?
how to debug struts project in netbean ?
why servlet is used as controller not JSP?
how to implement singletun design patteren in struts?
I will explain the scenario now i have a form1 having some fields and i made it extends DynaActionForm. in struts config how can i specify another form form2 which has to extend the form1 please specify is it better to use actionform or dyna action form in applations. is dyna action form is comfortable in declaring form variables of type 'ArrayList<somegenerics>' extend the
What’s the difference between validation.xml and validator-rules.xml files in struts validation framework?
Why do we need struts?
Can we have multiple struts config files in a single web app?
What is the purpose of @before annotation?
How struts2 supports internationalization?