who will run the execute method in struts?
Answers were Sorted based on User's Feedback
Answer / sunny goyal
The RequestProcessor instantiates the Action class
specified in the ActionMapping (struts-config.xml) and
invokes the execute() method on the Action instance
| Is This Answer Correct ? | 8 Yes | 0 No |
protected ActionForward
processActionPerform(request,response,action,form,mapping)
throws IOException, ServletException {
try {
return (action.execute(mapping, form, request,
response));
} catch (Exception e) {
return (processException(request, response, e,
form, mapping));
}
}
this is the logic used in RequestProcessor class to call the
execute() method through ActionServlet. B'coz ActionServlet
is the front controller class and in this class only we are
calling RequestProcessor class. So ActionSerlvet is calling
execute() method through RequestProcessor class.
Thankyou.
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / bhaskar j
r u sure Ratheeshnellikkal?...
it may be action class i think
| Is This Answer Correct ? | 7 Yes | 3 No |
Answer / sudhir
An Action is an adapter between the contents of an incoming
HTTP request and the corresponding business logic that
should be executed to process this request. The controller
(RequestProcessor) will select an appropriate Action for
each request, create an instance (if necessary), and call
the execute method.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / raghavendra
ActionServlet is nothing but the struts framework.
The ActionServlet cretaes the formbean object and if
required creates the action class and calls the validate
method(if validate = true in struts-config.xml).
If any errors returned by validate method, it forwards the
request to the resourse specified in input attribute.
If no errors returned by validate method,struts execute the
execute method.
| Is This Answer Correct ? | 6 Yes | 5 No |
What do struts do?
what are java stuts? what are there uses
2 Answers Rupa, Tech Mahindra,
what is ForwardAction and IncludeAction in struts?
how to write uploadphoto in the insert update delete using struts? write code struts and jsp jdbc
What are the custom tags?
Hai all.Can i develope Struts action class without execute(-,- ,-,-)method.Ifd it's possible plz provide some sample code.
What’s the difference between struts and turbine? What’s the difference between struts and espresso?
What is difference between perform() used in struts1.0 and execute() used in 1.1 ?
What is apache struts vulnerability?
What are the two scope types for formbeans?
What does modeldriven interceptor?
What is the role of action class in struts?