Class HttpUtil

java.lang.Object
alpine.server.util.HttpUtil

public final class HttpUtil extends Object
This class contains a collection of useful utility methods for various HTTP tasks.
Since:
1.0.0
Author:
Steve Springett
  • Method Details

    • getSessionAttribute

      public static <T> T getSessionAttribute(javax.servlet.http.HttpSession session, String key)
      Returns a session attribute as the type of object stored.
      Type Parameters:
      T - the type of object expected
      Parameters:
      session - session where the attribute is stored
      key - the attributes key
      Returns:
      the requested object
      Since:
      1.0.0
    • getRequestAttribute

      public static <T> T getRequestAttribute(javax.servlet.http.HttpServletRequest request, String key)
      Returns a request attribute as the type of object stored.
      Type Parameters:
      T - the type of the object expected
      Parameters:
      request - request of the attribute
      key - the attributes key
      Returns:
      the requested object
      Since:
      1.0.0