title: How does one intercept a request during the Jersey lifecycle?
body: <p>I've used Jersey for the better part of a year now and have just stumbled upon a problem to which I can't find the answer: how do you intercept (or hook into) the Jersey request lifecycle?</p>
  
  <p>Ideally, I'd be able to perform some custom filtering/validation/rejection between the time the container accepts the request from the network and the time my handler methods are called.  Bonus points if there's an easy way to filter the interceptors by sub-path (e.g. have one interceptor for anything under /, another for anything under /user/, etc.).</p>
  
  <p>Thanks!</p>
  
  <p>Edit: To be a bit clearer, the general idea here is to be able to write some code that will be run for many API calls without having to explicitly call that code from each handler method.  This would reduce extra code and eliminate the need to pass request contexts around.</p>