Thanks for ur help Manish,
I need to return actionmapping.
so do you suggest, instead of
return mapping.forward("success");
just include
request.getRequestDispatcher("path to your
jsp").forward(request,respose);
I'm sorry , i'm new to struts . SO this type of questions may arise.
Manish Pandit - 19 Oct 2006 22:32 GMT
You're welcome - and its okay - Struts can be confusing at times.
You do not need to return an actionmapping. When you use request
dispatcher, the server will direct your request and response to the URL
you specify. The control is *never* going to come back to the execute()
method. For compilation's sake, you can do a return null. However, to
reiterate - make sure you do not commit your response before calling
the dispatcher - this will lead to an illegal state exception. Normally
I've used this API to process the request, set some request attributes
for the JSP being called and thats it. I never touched the response
throughout this process.
On another note, if you wish the control comes back to execute(), look
at the include() method of RequestDispatcher interface.
-cheers,
Manish