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

execAndWait problem

John Eric Hamacher
Ranch Hand

Joined: Apr 25, 2007
Posts: 230
Hello: IN a jsp in my application, I have form whose action points at a Struts 2 Action. The form submits successfully and the contents of the Action complete normally. Then I tried to implement the execAndWait intereceptor as per page 370 in the book. The refresh is set at 2 seconds.

It didn't work well . . . through debugging I find that the Action is being performed twice. The second time, it fails validation (all the fields are then "empty") and I get forwarded back to my jsp with validation messages. I tried placing the execAndWait interceptor-ref both before and after the default stack but neither worked. Any ideas?

my config:

my jsp:


Joined: Dec 08, 2008
Posts: 2
Hi, I also have a same problem. it's working fine if we remove execAndwait interceptor reference entry from action mapping.
[ December 08, 2008: Message edited by: KRISHNA KK ]
David Newton

Joined: Sep 29, 2008
Posts: 12617

The target of the execAndWait refresh should either be an action (or action method) that doesn't expect any parameters, or the URL used should include all the relevant parameters. Which you use depends on the application.

I'm assuming you already looked at the execAndWait documentation, but if you didn't, there it is.
I agree. Here's the link:
subject: execAndWait problem
jQuery in Action, 3rd edition