Dave Newton pondered:
> Andreas B. Thun wrote:
> > I wrote a JSP to start a JAVA scriptlet.
> > It works fine but now I have the problem
> > to evaluate the return value of my scriptlet
> > to give the user a feedback if the action
> > was successful.
> > getErrorCode() delivers the scriplets return
> > value.
> > I have to wait until the scriplet is finished...
> >
> > Do you have any ideas how this can be done?
> >
> > <%
> > RunWorkflow wf = new RunWorkflow(args);
> > wf.execute();
> > %>
> <%= getErrorCode() %>
>
> *shudder*
Yeah, I don't know why such code wouldn't be in the Action, rather than
embedded in the JSP. Apparently it is spawning a worker thread rather
than blocking (another problematic issue within the container). My
approach, givent these constraints, would be to add
wf.waitFor();
and implement a method that doesn't return until the process is
complete. Of course, this implies that the wf.execute() call should be
synchronous, in the first place.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]