Response code 404 returned with DMF on IBM WebSphere Liberty

Description

When using DMF on WebSphere Liberty, we have 404 response even when DMF picks an action bean and uses it for the request.

When DMF calls chain.doFilter(), it passes the error trapping request wrapper. This one overrides sendError() methods.

With Tomcat, the original response (not wrapper) has a status code 200 when the Dispatcher is invoked with the bean found. The method sendError() is called on the wrapper, which doesn't modify the original (wrapped) response's status code, but sets a private field.

Liberty doesn't invoke sendError(). Instead it calls setStatus() ! This modifies the original response, which then has a 404 return code...

We need to override setStatus() as well in ErrorTrappingResponseWrapper, and update the private fields of the wrapper, instead of letting the original response be modified.

Environment

None

Status

Assignee

R

Reporter

R

Labels

None

Tester

None

Components

Fix versions

Affects versions

Release 1.5.8

Priority

Major
Configure