This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Tomcat and the fly likes TOMCAT valve/global-filter setting MDC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Products » Tomcat
Bookmark "TOMCAT valve/global-filter setting MDC" Watch "TOMCAT valve/global-filter setting MDC" New topic

TOMCAT valve/global-filter setting MDC

Veeresh Hubballi

Joined: Apr 10, 2011
Posts: 2
I am trying to set MDC values in a global filter/Custom Valve.


Why i am not able to see tha same getting appended in the logs.
I have included [%X{user}].But i get empty([]) in my logs.

And more over MDC.class.hashCode() in the valve/global filter and in servlet are showing different values even though Thread.currentThread().getname() is same.

I agree. Here's the link:
subject: TOMCAT valve/global-filter setting MDC
It's not a secret anymore!