Good morning,

your interceptor stack doesn't appear to be complete.

By adding the following codes into struts.xml, no exception anymore. But the action page does *not* go to wait.jsp; but stays on the original action class page.

<interceptor name="execAndWait" class="com.opensymphony.webwork.interceptor.ExecuteAndWaitInterceptor"/>

Do I need to explicit saying the following in struts.xml?

  <interceptor-stack name="completeStack">
                <interceptor-ref name="prepare"/>
                <interceptor-ref name="servlet-config"/>
                <interceptor-ref name="chain"/>
                <interceptor-ref name="model-driven"/>
                <interceptor-ref name="component"/>
                <interceptor-ref name="fileUpload"/>
                <interceptor-ref name="static-params"/>
                <interceptor-ref name="params"/>
                <interceptor-ref name="conversionError"/>
                <interceptor-ref name="validation"/>
                <interceptor-ref name="workflow"/>
            </interceptor-stack>


Thanks a lot!
Emi



Below is a code-frag from the following link: 
http://struts.apache.org/2.2.1/docs/execute-and-wait-interceptor.html

<action name="someAction" class="com.examples.SomeAction">
     <interceptor-ref name="completeStack"/>
     <interceptor-ref name="execAndWait">
         <param name="delay">1000<param>
         <param name="delaySleepInterval">50<param>
     <interceptor-ref>
     <result name="wait">longRunningAction-wait.jsp</result>
     <result name="success">longRunningAction-success.jsp</result>
</action>




On 06/02/2011 03:40 PM, Dale Newfield wrote:
You didn't add exec-and-wait, you replaced your entire interceptor stack with 
just the exec-and-wait interceptor.

Can you provide more information please?
http://www.mkyong.com/struts2/struts-2-execandwait-interceptor-example/

I setup almost the same example. The differences
. my action class has bean from spring
. use tiles for "adm" result

Thanks a lot!
Emi




-Dale

On Jun 2, 2011, at 3:35 PM, Emi Lu<em...@encs.concordia.ca>   wrote:

Hello,

One action class to send emails to 50 users. Before action is done, I'd like to 
show a waiting page.

When I added execAndWait shown as the following:
<action name="*ProcessAction"  method="{1}" class="ProcessAction">
     <interceptor-ref name="execAndWait">
       <param name="delay">2000</param>
       <param name="delaySleepInterval">500</param>
     </interceptor-ref>
     <result name="wait">/wait.jsp</result>

     <result name="adm"       type="tiles">browse_action1</result>
...


I got the following Error message returned.

Could someone help what is missing?


I found examples about progressbar + fileupload, but what about waiting for 
sending emails, is there a online doc about this?

Thanks a lot!
Emi


java.lang.NullPointerException at 
org.apache.struts2.ServletActionContext.getRequest(ServletActionContext.java:112)
 at ProcessAction.execute(Unknown Source) at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597) at 
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)
 at 
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291)
 at 
org.apache.struts2.interceptor.BackgroundProcess$1.run(BackgroundProcess.java:57)
 at java.lang.Thread.run(Thread.java:662)


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to