what is the different of execute and processRequest method
Joined: Jan 05, 2007
Hi moon moon,
I hope Mark Spritzler woudnt like the way you have registered with your name
Second issue would be posting your query in the wrong forum. You should have posted this question in struts forum.
Anyway, lets come to the question and the answer is :
WebContainer(tomcat) do deploy a object as a standard implementation of RequestDispatcher(interface) that allows it to listen the incoming request from the client and forward to the server resource for processing. ActionServlet(in struts) which is responsible for taking care of all incoming response and do send response back to client. Internally it call ApplicationDispather object which has processrequest method to process request and send it to appropiate action(as defined in your mapping file struts-config.xml)
We know we have to write our business logic inside execute(overided method of Action class) method to complete the picture of struts.
So execute method comes into play when we are defining our business logic and performexecute comes into play when main servlet is handling the incoming request and sending back the response.
I hope this would clear your doubt
Cheers !!! Sumit Malik
If at first you don't succeed, don't try skydiving