Please implement support for custom handling on client (browser) side of redirect server response to a dwr call.
Currently textHtmlHandler only captures 200 OK responses with non-empty content, so situation when e.g. Spring security filter chain handles request on an expired session (and thus expired security context) request might not get to DWR servlet (spring security filter chain being registered before dwr servlet), Spring security will typically respond with redirect response to authentication processing filter entry point (a login page) with status code 302 and empty response content.
Support could be through additional dwr.engine._redirectHandler adjustable through dwr.engine.setRedirectHandler. By default it could be same as defaultTextHtmlHandler. One could then override redirectHandler setting and provide custom handler for redirect response, even use same custom handler as both redirect and textHtml handler, but with flexibility to use different one for each case.
How to set redirectHandler should also be documented at least at [Error Handling documentation|
http://directwebremoting.org/dwr/other/errors.html] page.