Skip to content

Conversation

csware
Copy link

@csware csware commented Jan 19, 2024

This is seen as superior to a filter as the MDC is not cleared before an error handler servlet is executed.

cf. PR #768

public class MDCInsertingServletRequestListener implements ServletRequestListener {
@Override
public void requestInitialized(ServletRequestEvent sre) {
insertIntoMDC(sre.getServletRequest());
Copy link
Author

@csware csware Jan 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, we could also call the insertIntoMDC in the MDCInsertingServletFilter to avoid code duplication.

This is seen as superior to a filter as the MDC is not cleared before an error handler servlet is executed.

Signed-off-by: Sven Strickroth <[email protected]>
@csware csware force-pushed the mdc-servlet-request-listener branch from 52818a8 to f1ba14a Compare January 19, 2024 11:55
@csware
Copy link
Author

csware commented Jan 19, 2024

TODO: The documentation needs updating...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant