code: private void writeMessage(final HttpServletResponse response, final String message, final int status)
        throws IOException {
      response.getWriter().println(message);
      response.setStatus(status);
    }
docs: process write message and status on the response.
  
  @param response
  @param message
  @param status
  @throws IOException