Package com.jk.web.util
Class JKWebContextUtil
java.lang.Object
com.jk.web.util.JKWebContextUtil
This class is a utility class for handling web context-related operations.
- Version:
 - 1.0
 - Author:
 - Dr. Jalal H. Kiswani
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptiongetHeadersMap(jakarta.servlet.http.HttpServletRequest request) This method retrieves a map of request headers from an HttpServletRequest.getRequestMap(jakarta.servlet.http.HttpServletRequest request, boolean includeParams) This method retrieves a map of request attributes from an HttpServletRequest.getSessionMap(jakarta.servlet.http.HttpSession httpSession) This method retrieves a map of session attributes from an HTTP session.static voidsync(jakarta.servlet.http.HttpServletRequest request) This method synchronizes the JKWebContext with information from the HttpServletRequest. 
- 
Constructor Details
- 
JKWebContextUtil
public JKWebContextUtil() 
 - 
 - 
Method Details
- 
getSessionMap
This method retrieves a map of session attributes from an HTTP session.- Parameters:
 httpSession- Specifies the HttpSession from which to retrieve attributes.- Returns:
 - a HashMap containing session attribute names and their corresponding values.
 
 - 
getRequestMap
public static HashMap<String,Object> getRequestMap(jakarta.servlet.http.HttpServletRequest request, boolean includeParams) This method retrieves a map of request attributes from an HttpServletRequest.- Parameters:
 request- Specifies the HttpServletRequest from which to retrieve attributes.includeParams- Indicates whether to include request parameters in the map.- Returns:
 - a HashMap containing request attribute names and their corresponding values.
 
 - 
sync
public static void sync(jakarta.servlet.http.HttpServletRequest request) This method synchronizes the JKWebContext with information from the HttpServletRequest.- Parameters:
 request- Specifies the HttpServletRequest containing information to synchronize.
 - 
getHeadersMap
This method retrieves a map of request headers from an HttpServletRequest.- Parameters:
 request- Specifies the HttpServletRequest from which to retrieve headers.- Returns:
 - a HashMap containing request header names and their corresponding values.
 
 
 -