Hey in your case for the input field not null any such silly thing you can actually write validation xml.
That will actually take care of returning back to the page with input error. Regarding the long time to take thingy, I don't know how the return SUCCESS is going to help the client, the client browser will wait for the server to respond, if its too long it will actually get timed out. The best solution is ajax. Even ajax won't work fine if your //long task takes more than request time out. Regards, Jishnu Viswanath Software Engineer *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll Tavant Technologies Inc., www.tavant.com PEOPLE :: PASSION :: EXCELLENCE -----Original Message----- From: Chase [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2008 6:01 AM To: Struts Users Mailing List Subject: Re: ExecAndWait (navigating back to the progress page) In my case it is a very long running action but even in the case of short running actions I would think users would want to be able to navigate away from the progress page and return. I thought maybe I just didn't know how to configure the actions correctly.... EDIT: So while writing the above reply a solution occurred to me. With a little trickery it's possible to do everything I was talking about with no AJAX. Documenting this pattern below in case anyone else ever comes across this problem. Have a single Action that directs the users to the form view and also handles the form submission. This solution will make it impossible for a user to view the form again until their task is complete. The key is to always use a delay for the execAndWait interceptor. <interceptor-ref name="execAndWait"> <param name="delay">500</param> </interceptor-ref> The Action class looks something like: public class LongAction extends ActionSupport { private String formField; public String getFormField() { return formField; } public void setFormField(String ff) { formField = ff; } public String execute() { if(formField == null || formField.length == 0) { return INPUT; //the form } else { //long task here return SUCCESS; //result page } } } The delay on the interceptor is important because we need a chance to return INPUT before being redirected to the wait page. If anyone has a more elegant solutions please let me know. Thanks, -Chase On Thu, Jul 17, 2008 at 11:41 AM, Karr, David <[EMAIL PROTECTED]> wrote: > I'm guessing the operation you're waiting for can take quite a while to > complete. Otherwise modifying the architecture of this probably > wouldn't be worth it. > > You might consider the flow of the original action to simply report a > simple "submitted and processing" result, and then implement an > Ajax-based timeout to quickly check the status of the long-running > process. > >> -----Original Message----- >> From: Chase [mailto:[EMAIL PROTECTED] >> Sent: Wednesday, July 16, 2008 4:23 PM >> To: user@struts.apache.org >> Subject: ExecAndWait (navigating back to the progress page) >> >> I want my users to be able to leave the wait page and return. >> Can this be done, what is the best way? >> >> I've got two actions. ActionA displays a form and the form >> submits to ActionB. ActionB is using the ExecAndWait >> interceptor. Right now users have to resubmit the form to get >> back to their status page (possibly resubmitting the form if >> ActionB has finished). How can I have ActionA display the >> wait page of ActionB instead of the form? >> >> Also, is there anyway to make the ExecAndWait interceptor >> function per context instead per session? This is a low >> volume internal app. >> >> Thanks, >> Chase >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any comments or statements made in this email are not necessarily those of Tavant Technologies. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you have received this in error, please contact the sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies may be subject to our monitoring procedures. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]