File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "struts" Watch "struts" New topic


bren jas

Joined: Feb 21, 2007
Posts: 12
what is the different of execute and processRequest method
Sumit Malik
Ranch Hand

Joined: Jan 05, 2007
Posts: 84
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
I agree. Here's the link:
subject: struts
It's not a secret anymore!