You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Paul McMahon <pm...@software.plasmon.com> on 2006/07/12 16:13:38 UTC

Detection of process complete

I am having problems getting an action to detect when an external process is 
complete.

I have a "navigation" action class that kicks off the process and then directs 
browser to a progress .jsp page.  redirect="false" so control stays with the 
navigation class. 

The progress .jsp page uses AJAX techniques to display ongoing progress, by 
calling a "progress" URL that returns progress fields in XML to fill in the 
progress .jsp page. The progress URL is mapped by Struts to a progress action 
class/form to do this work.

The "progress" action returns "success" or "fail" mapping when the process is 
complete. I expect this to go to a summary page as shown in struts config 
below, but the browser stays on the progress page.

Here are my action mappings:
     <action 
        path="/RecoveryNavigation"
        type="com.plasmon.appliance.action.RecoveryNavigationAction"
        scope="session"
        name="RecoveryNavigationForm"
        validate="false">
         
         <forward name="nosession" path="/Logout.do" redirect="true" />
         <forward name="archives_exist" path="/appliance/recovery/Options.jsp" 
redirect="false"/>
         <forward name="clean_system" 
path="/appliance/recovery/CleanOptions.jsp" redirect="false"/>         
         <forward name="progress" path="/appliance/recovery/Progress.jsp" 
redirect="false"/>
         <forward name="cancel" path="/Summary.do" redirect="true"/>
         <forward name="success" path="/Summary.do" redirect="true"/>
         <forward name="fail" path="/Summary.do" redirect="true"/>         
     </action>    

Note this action is only "called" from within AJAX javascript in the 
Progress.jsp page:
         
     <action 
        input="/appliance/recovery/Progress.jsp"
        name="RecoveryProgressForm"
        path="/RecoveryProgress"
        scope="session"
        type="com.plasmon.appliance.action.RecoveryProgressAction"
        validate="false">
         
         <forward name="success" path="/Summary.do" redirect="true"/>
         <forward name="fail" path="/Summary.do" redirect="true"/>
     </action>    

When RecoveryProgressAction returns mapping "success" or "fail" I would expect 
redirection to Summary page but this is not happening.

Any ideas?

-- 
-Paul McMahon

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


Re: Detection of process complete

Posted by Martin Gainty <mg...@hotmail.com>.
Good Morning Mr McMahon

is your execute method of RecoveryProgressAction class returning-
        return mapping.findForward("success");

Anyone else?
M-
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



----- Original Message ----- 
From: "Paul McMahon" <pm...@software.plasmon.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Wednesday, July 12, 2006 10:13 AM
Subject: Detection of process complete


>I am having problems getting an action to detect when an external process is 
> complete.
> 
> I have a "navigation" action class that kicks off the process and then directs 
> browser to a progress .jsp page.  redirect="false" so control stays with the 
> navigation class. 
> 
> The progress .jsp page uses AJAX techniques to display ongoing progress, by 
> calling a "progress" URL that returns progress fields in XML to fill in the 
> progress .jsp page. The progress URL is mapped by Struts to a progress action 
> class/form to do this work.
> 
> The "progress" action returns "success" or "fail" mapping when the process is 
> complete. I expect this to go to a summary page as shown in struts config 
> below, but the browser stays on the progress page.
> 
> Here are my action mappings:
>     <action 
>        path="/RecoveryNavigation"
>        type="com.plasmon.appliance.action.RecoveryNavigationAction"
>        scope="session"
>        name="RecoveryNavigationForm"
>        validate="false">
>         
>         <forward name="nosession" path="/Logout.do" redirect="true" />
>         <forward name="archives_exist" path="/appliance/recovery/Options.jsp" 
> redirect="false"/>
>         <forward name="clean_system" 
> path="/appliance/recovery/CleanOptions.jsp" redirect="false"/>         
>         <forward name="progress" path="/appliance/recovery/Progress.jsp" 
> redirect="false"/>
>         <forward name="cancel" path="/Summary.do" redirect="true"/>
>         <forward name="success" path="/Summary.do" redirect="true"/>
>         <forward name="fail" path="/Summary.do" redirect="true"/>         
>     </action>    
> 
> Note this action is only "called" from within AJAX javascript in the 
> Progress.jsp page:
>         
>     <action 
>        input="/appliance/recovery/Progress.jsp"
>        name="RecoveryProgressForm"
>        path="/RecoveryProgress"
>        scope="session"
>        type="com.plasmon.appliance.action.RecoveryProgressAction"
>        validate="false">
>         
>         <forward name="success" path="/Summary.do" redirect="true"/>
>         <forward name="fail" path="/Summary.do" redirect="true"/>
>     </action>    
> 
> When RecoveryProgressAction returns mapping "success" or "fail" I would expect 
> redirection to Summary page but this is not happening.
> 
> Any ideas?
> 
> -- 
> -Paul McMahon
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>