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


Mathew Geraldo

Joined: Mar 27, 2013
Posts: 21
Hello Gurus:

I have a Struts2 application that has an action that can take anywhere between 1 sec to 5 mins to run. So, I'm using the execAndWait interceptor to display a wait page if the action takes more than 20 secs to run. The setup of the action looks like this:

<action name="myAction" class="myActionClass">
<interceptor-ref name="defaultStack" />
<interceptor-ref name="execAndWait">
<param name="delay">20000</param>
<result name="success">myPage.jsp</result>

<result name="wait">waitPage.jsp</result>

I have tested this with a scenario where the action just takes 1 second to run. I expected that the wait page will never be shown.

However, the wait page still showed up. I tried debugging my action class and method and found that the execution hangs at this statement below for the time specified in the

<param name="delay">

In this case, it waits for 20 secs at the statement below and then completes execution successfully.

getSession().put(A_SESSION_VARIABLE, 10);

Note: MyActionClass does implement SessionAware

Has anyone else experienced this problem? Is there a work around for this?

I agree. Here's the link:
subject: WaitPage.jsp
It's not a secret anymore!