struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell Neufeld <>
Subject Sending back HTML with Struts 2 while shutting down the server
Date Wed, 29 Apr 2009 21:12:22 GMT
Hi all,

    One of the struts actions I'm implementing shuts down the server.  
I'd like to be able to send back an HTML response before the server 
shuts down, but the action's execute() method doesn't dispatch to the 
jsp for the html response until after the return of the method.  That 
means if I start my shutdown sequence before returning from execute(), 
there's a race and the response HTML may not make it back to the browser.

    In Struts 1 (which I realize is a different framework) I manually 
called the request dispatcher in the execute() method to first return an 
HTML response, and then I started the shutdown sequence.  Can I do the 
same thing in Struts 2?  Is there a special value I can return from a 
Struts 2 execute() method, say null, which tells the framework not to 
send any HTML response back (because I've already done that manually 
with a request dispatcher)?



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