code: @Override
    public void writePostCommitResponse(int statusCode) throws Exception {
      addResponseParameter("statusCode", statusCode);
      addResponseParameter("messages", getMessages());
      if (statusCode == StatusCode.OK && !StringUtils.isBlank(getRedirectURL())) {
        addResponseParameter("redirectURL", getRedirectURL());
      }
  
      // Write the JSON response
  
      getResponse().setContentType("text/javascript");
      PrintWriter responseWriter = getResponse().getWriter();
      try {
        jsonResponse.write(responseWriter);
      }
      finally {
        responseWriter.close();
      }
    }
docs: Writes the response to the JSON request.
  <br><br>
  In addition to all response parameters added to the context by the JSON request controller, the
  following parameters also exist in the response:
  <br><br>
  <code>statusCode</code> identifying whether the call was successful or not<br>
  <code>errorLevel</code>, if the status code is not {@link StatusCode#OK}<br>
  <code>errorMessage</code>, if the status code is not {@link StatusCode#OK} <br>
  <code>redirectURL</code>, if a redirect URL has been set to the context<br>
  
  @throws Exception If writing the response fails for any reason