Package alpine.server.util
Class HttpUtil
java.lang.Object
alpine.server.util.HttpUtil
This class contains a collection of useful utility methods for various HTTP tasks.
- Since:
- 1.0.0
- Author:
- Steve Springett
-
Method Summary
Modifier and TypeMethodDescriptionstatic <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 Details
-
getSessionAttribute
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
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
-