Dear Wiki user, You have subscribed to a wiki page or wiki category on "Struts Wiki" for change notification.
The following page has been changed by BaqHaidri: http://wiki.apache.org/struts/StrutsPleaseWait ------------------------------------------------------------------------------ The entire solution itself involves five elements: - 1. An addition of {{{parameter=processWithWait}}} in any action-mapping in the struts-config.xml file for an action that would take a long time. + 1. An addition of a {{{parameter=processWithWait}}} attribute in any action-mapping in the struts-config.xml file for an action that would take a long time. 2. An extension of both the {{{processActionPerform}}} and the {{{processValidate}}} methods in the Struts {{{RequestProcessor}}}. 3. A simple Java bean, which I call {{{ForwardActionBean}}}. 4. A jsp, pleaseWait.jsp, which represents the 'Please Wait' page itself. @@ -30, +30 @@ </action> }}} - Ok, so now you have this parameter, {{{parameter="processWithWait"}}}. What is Struts going to do with it? As you may know, all incoming client requests go through the Struts {{{ActionServlet}}} then over to the Struts {{{RequestProcessor}}} class. Depending on your configuration, this class then forwards to the appropriate Struts Action class for your actual business processing. + Ok, so now you have this attribute, {{{parameter="processWithWait"}}}. What is Struts going to do with it? As you may know, all incoming client requests go through the Struts {{{ActionServlet}}} then over to the Struts {{{RequestProcessor}}} class. Depending on your configuration, this class then forwards to the appropriate Struts Action class for your actual business processing. That's all nice and good. But we don't want Struts to go right to our action just yet. We want it to serve up our 'Please Wait' page first and then forward to our action. That way, our user has a nice Please Wait page with some animation that they can swear at while our computers chug away in the background. Here's where our overridden {{{RequestProcessor.processActionPerform}}} method comes in. Now before you take a look at the lines and lines of code below (mostly comments), it's good to understand the following flow: --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]