struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Baubak Gandomi" <>
Subject Asynchronous Display of Action Results
Date Mon, 11 Jul 2011 14:43:10 GMT


I am not able to find any mention of this topic, or even if it is really
Struts 2-related.


I have a view which calls two actions using <s:action. The methods that
are called in the domain of the actions take different times to execute.
I would like my actions to be run parallel. I.e. Once they are finished
executing, that their results are show the moment they finish.



<package name="ActionTests_Application" extends="struts-default">

        <action name="start">




        <action name="action1" class="action_tld.Main_Class"

            <result name="success">/WEB-INF/pages/page1.jsp</result>



        <action name="action2" class="action_tld.Main_Class"

            <result name="success">/WEB-INF/pages/page2.jsp</result>







public class Main_Class {

      private int delay = 0;


      public String method1() {



            return ActionSupport.SUCCESS;



      public String method2() {



            return ActionSupport.SUCCESS;











            <s:action name="action1" executeResult="true"></s:action>


            <td><s:action name="action2"
executeResult="true"></s:action> </td>




-------Page1 & 2

Just show a simple text


In the example above method2 takes longer to execute than method1. Today
when I execute start The result of action1 is displayed before action2.
However what I want is that action1 & action2 to be executed
simultaneously, and that the result of action2 is presented first.


This may not be a Struts2 question perse, but if anyone has any leads I
am much obliged. 


Best regards,



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message