By using the below code snippet we can get the session data in Web sphere Commerce.
HttpSession httpSession = null;
ViewCommandContext viewCmdCtx = (ViewCommandContext) getCommandContext();
Object reqObject = viewCmdCtx.getRequest();
HttpControllerRequestObject httpControllerRequestObject = (HttpControllerRequestObject) reqObject;
HttpServletRequest httpRequest = httpControllerRequestObject.getHttpRequest();
httpSession = httpRequest.getSession();
HttpSession httpSession = null;
ViewCommandContext viewCmdCtx = (ViewCommandContext) getCommandContext();
Object reqObject = viewCmdCtx.getRequest();
HttpControllerRequestObject httpControllerRequestObject = (HttpControllerRequestObject) reqObject;
HttpServletRequest httpRequest = httpControllerRequestObject.getHttpRequest();
httpSession = httpRequest.getSession();
Comments
Post a Comment