Package alpine.util
Class HttpUtil
- java.lang.Object
-
- alpine.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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TgetRequestAttribute(javax.servlet.http.HttpServletRequest request, String key)Returns a request attribute as the type of object stored.static <T> TgetSessionAttribute(javax.servlet.http.HttpSession session, String key)Returns a session attribute as the type of object stored.
-
-
-
Method Detail
-
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 storedkey- 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 attributekey- the attributes key- Returns:
- the requested object
- Since:
- 1.0.0
-
-