title: How to set cookie on DropWizard view and still return View?
body: <p>I'm helping maintain an app where we use DropWizard, which is nice.</p>
  
  <p>I'd like to set a cookie, and return the view still.</p>
  
  <p>I see people mentioning this approach:</p>
  
  <blockquote>
    <p>Response r =
    javax.ws.rs.core.Response.ok().cookie(COOKIE_HERE).entity(view).build();</p>
    
    <p>return r;</p>
  </blockquote>
  
  <p>but to get that to work you have to return the "Response" object, and not the view. </p>
  
  <p>Is there anyway to do this and be able to return a view instead of a response? I know I can use the HttpServletResponse to set the cookie, but I'd prefer to do it with the view or response object if possible to avoid extra context.</p>