title: How to add custom response and abort request in jersey 1.11 filters
body: <p>I am trying to implement user authentication for rest calls in jersey 1.11 filters.</p>
  
  <p>This is what i have tried</p>
  
  <pre><code>package com.ilrn.session.webservices.rest.filter;
  
  import com.ilrn.entity.User;;
  import com.sun.jersey.spi.container.ContainerRequest;
  import com.sun.jersey.spi.container.ContainerRequestFilter;
  
  public class CustomFilter implements ContainerRequestFilter{
  
      @Override
      public ContainerRequest filter(ContainerRequest request) {
          User user = Helper.getCurrentUser();
          if(user == null){
              //Need to add custom response and abort request
          }
          return request;
      }
  
  }
  </code></pre>
  
  <p>Does anyone know any method or something to achieve the same?</p>