public static HttpSession createProxy(HttpServletRequest request) { HttpSession servletSession = request.getSession(); PortletRequest portletRequest = (PortletRequest) request.getAttribute("javax.portlet.request"); if (portletRequest != null) { PortletSession portletSession = portletRequest.getPortletSession(); servletSession = (HttpSession)createProxy(request, "javax.portlet.p."+PortletWindowUtils.getPortletWindowId(portletSession)); } return servletSession; }
/** * Constructor which will attempt to discover the portlet window id to use as the portlet name * space and delegate construction to * {@link ServletPortletSessionProxy#createProxy(HttpServletRequest, String)}. * * @param request * @return */ public static HttpSession createProxy(HttpServletRequest request) { HttpSession servletSession = request.getSession(); PortletRequest portletRequest = (PortletRequest) request.getAttribute("javax.portlet.request"); if (portletRequest != null) { PortletSession portletSession = portletRequest.getPortletSession(); servletSession = (HttpSession)createProxy(request, "javax.portlet.p."+PortletWindowUtils.getPortletWindowId(portletSession)); } return servletSession; }
filterRequestContext.setRequest(new PortletServletRequestWrapper(config .getServletContext(), filterRequestContext.getRequest(), ServletPortletSessionProxy.createProxy(filterRequestContext.getRequest()), filterPath)); if (WicketPortlet.ACTION_REQUEST.equals(filterRequestContext.getRequest().getAttribute( if (portletWindowId != null) HttpSession proxiedSession = ServletPortletSessionProxy.createProxy(request, portletWindowId); pathInfo = stripWindowIdFromPathInfo(pathInfo);