[Logo]
Forums Register Login
struts
what is the different of execute and processRequest method
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
We cannot change unless we survive, but we will not survive unless we change. Evolving tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA


This thread has been viewed 609 times.

All times above are in ranch (not your local) time.
The current ranch time is
Aug 16, 2018 16:26:14.