Description
After injecting the the HttpServletResponse with the @Context annotation:
@POST
@Path("/login")
public Feed login(@FormParam("username") String username,
@FormParam("password") String password,
@Context HttpServletResponse httpServletResponse)
and than setting a status code (for example 401 if the user is not authorized), the status code get lost.
See here for workarounds and more detials:
http://www.nabble.com/Setting-the-status-code-in-the-injected-(via-the-jax-rs-@context)--HttpServletResponse-td25883621.html