public class ServletOps extends Object
  • Constructor Details

    • ServletOps

      public ServletOps()
  • Method Details

    • responseSendError

      public static void responseSendError(javax.servlet.http.HttpServletResponse response, int statusCode, String message)
      Send an HTTP error response. Include an optional message in the body (as text/plain), if provided. Note that we do not set a custom Reason Phrase.
      HTTPS/2 does not have a "Reason Phrase".
      response -
      statusCode -
      message -
    • responseSendError

      public static void responseSendError(javax.servlet.http.HttpServletResponse response, int statusCode)
      Send an HTTP response with no body
    • writeMessagePlainTextError

      public static void writeMessagePlainTextError(javax.servlet.http.HttpServletResponse response, String message)
    • successNoContent

      public static void successNoContent(HttpAction action)
    • success

      public static void success(HttpAction action)
    • successCreated

      public static void successCreated(HttpAction action)
    • successNotFound

      public static void successNotFound(HttpAction action)
    • success

      public static void success(HttpAction action, int httpStatusCode)
    • successPage

      public static void successPage(HttpAction action, String message)
    • warning

      public static void warning(HttpAction action, String string)
    • warning

      public static void warning(HttpAction action, String string, Throwable thorwable)
    • errorParseError

      public static void errorParseError(RiotParseException ex)
    • errorBadRequest

      public static void errorBadRequest(String string)
    • errorNotFound

      public static void errorNotFound()
    • errorNotFound

      public static void errorNotFound(String string)
    • errorNotImplemented

      public static void errorNotImplemented(String msg)
    • errorMethodNotAllowed

      public static void errorMethodNotAllowed(String method)
    • errorMethodNotAllowed

      public static void errorMethodNotAllowed(String method, String msg)
    • errorForbidden

      public static void errorForbidden()
    • errorForbidden

      public static void errorForbidden(String msg)
    • error

      public static void error(int statusCode)
    • error

      public static void error(int statusCode, String string)
    • errorOccurred

      public static void errorOccurred(String message)
    • errorOccurred

      public static void errorOccurred(Throwable ex)
    • errorOccurred

      public static void errorOccurred(String message, Throwable ex)
    • formatForLog

      public static String formatForLog(String string)
    • setNoCache

      public static void setNoCache(HttpAction action)
    • setNoCache

      public static void setNoCache(javax.servlet.http.HttpServletResponse response)
    • uploadResponse

      public static void uploadResponse(HttpAction action, UploadDetails details)
      response to a upload operation of some kind.
    • sendJsonReponse

      public static void sendJsonReponse(HttpAction action, JsonValue v)
      Send a JSON value as a 200 response. Null object means no response body and no content-type headers.
    • sendJson

      public static void sendJson(HttpAction action, JsonValue jValue)
      Send a JSON value as a 200 response. Null object means no response body and no content-type headers.