File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

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:

KRISHNA KK
Greenhorn

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
Author
Rancher

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: http://aspose.com/file-tools
 
subject: execAndWait problem
 
Similar Threads
How to use Struts2 interceptor-ref "execAndWait"?
tokenSession and execAndWait interceptor together
ExecAndWait interceptor parameters lost
Struts2 - execAndWait Interceptor
Proble with <interceptor-ref name="execAndWait"/>