title: spring - how to pass a value from an app to a filter
body: <p>So I need to add a filter to a spring app, such that after the response has been flushed back to the client, I write to a log file. The values I want to write to the log file are determined within the app. In other words, I would like to pass values, ideally a hashmap of values, to the filter that sits after the main processing has completed.</p>
  
  <p>Is there a best practice way of doing this? I could imagine that I could instantiate the hashMap in the filter when the request first comes in, stash that hashmap somewhere (where?), retrieve it in the app and write to it, and then retrieve it again in the exit filter and write the value out. Is that the best practice way to do it, and if so:</p>
  
  <p>1) Do I have just one filter that fires on entry and exit or do I need to set up two, one for before the app and one for after?</p>
  
  <p>2) Where is the best practice place to stash my data store?</p>