I have a REST web service running in Tomcat version 7 using Jersey 1.18. Each request that comes in has a custom header called 'request-id'. I would like to store this request id in some place so that all classes have access to this request id and can use it for logging.
The main thing is, this has to be on a per request basis. The request-id for request A is different than that of request B.
Where can I store such a variable? Some sort of a Context which is valid on a per request basis.