The "threading stuff" only sounds intimidating but its actually
simple. In the execute() method of your action class, all you need to
do is go something like:

new Thread() {
    public void run() {
         //your processing logic
         Business.processWhatever();

         //place flag in session afterwards
         request.getSession(false).setAttribute("myFlag", "");
    }
}
.start()

return mapping.findForward("processing");


Note that you have to make final variables of all the parameters of
the execute() method for this to compile as i used an anonymous inner
class...

-Yves-


On Tue, 14 Sep 2004 18:45:47 +0200, Håkon T Sønderland <[EMAIL PROTECTED]> wrote:
> Wayne Fuller wrote:
> 
> > On Tue, 14 Sep 2004 17:05:58 +0200, Håkon T Sønderland <[EMAIL PROTECTED]> wrote:
> >
> >>Sorry for being a complete clueless newbie, but could you expand
> >>a bit on this?  I don't have the concepts quite clear enough to
> >>understand what you mean.
> >>
> >>Thanks,
> >>Håkon
> >
> >
> > That's quite alright, no need to apoligize, I should have explained a
> > little more.  We have a jsp page where a user clicks a submit button,
> > which calls the jsp page javascript method below, openNewBrowser.
> > This in turn opens a new window which is first directed to whatever
> > someReport.html contains.  In our case it is a flash file, but it
> > could be anything.  In the html file we do a submit on the load event.
> >  Probably not the most elegant way of doing this, but it works.  If
> > you need anymore explanation let me know.
> >
> > ******* Excerpt from jsp page *************
> [snip]
> > ******* End of Excerpt from html page *************
> 
> OK, thanks, I think I understood that.
> However, does not this page then stay up there even after the action is
> completed and you go to your result page?
> 
> My problem is that the struts page I'm developing is "embedded" inside
> a webpage (from a publishing system using .net) and I would like to
> display a 'please wait' type of message inside my little frame while
> the stuff is processing (it is a credit scoring application so it takes
> quite a while waiting for web-services and stuff).  Might be possible
> to do what Yves is suggesting, but I'm not up to speed with the treading
> stuff either (disadvantages to being a newbie again).
> 
> Thanks again,
> 
> 
> Håkon
> --
> We shall fight on the beaches,
> we shall fight on the landing grounds,
> we shall fight in the fields and in the streets,
> we shall fight in the hills;
> we shall never surrender
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to