private boolean isPortletScopeSessionConfigured(PortletRequestContext requestContext) { boolean portletScopeSessionConfigured = false; PortletConfig portletConfig = requestContext.getPortletConfig(); Map<String, String[]> containerRuntimeOptions = portletConfig.getContainerRuntimeOptions(); String[] values = containerRuntimeOptions.get("javax.portlet.servletDefaultSessionScope"); if (values != null && values.length > 0) { portletScopeSessionConfigured = "PORTLET_SCOPE".equals(values[0]); } return portletScopeSessionConfigured; }
@Override public PortletContext getPortletContext() { return requestContext.getPortletConfig().getPortletContext(); }
txt.append("requestContext null: ").append(requestContext == null); if (requestContext != null) { txt.append(", portletConfig null: ").append(requestContext.getPortletConfig() == null); Map<String, String[]> options = requestContext.getPortletConfig().getContainerRuntimeOptions(); String[] vals = null; if (options != null) {
public HttpServletRequest getHttpServletRequest(GenericPortlet portlet, PortletRequest request) { PortletWindow window = Jetspeed.getCurrentRequestContext().getCurrentPortletWindow(); HttpServletRequest req = (HttpServletRequest)window.getAttribute(SERVLET_REQUEST); if (req == null) { PortletRequestContext rc = window.getPortletRequestContext(); req = requestDispatcherService.getRequestWrapper(rc.getServletContext(), rc.getServletRequest(), request, null, true, false); req.setAttribute(ContainerConstants.PORTLET_CONFIG, rc.getPortletConfig()); req.setAttribute(ContainerConstants.PORTLET_REQUEST, window.getPortletRequest()); req.setAttribute(ContainerConstants.PORTLET_RESPONSE, window.getPortletResponse()); window.setAttribute(SERVLET_REQUEST, req); } return req; }
request.setAttribute(PortletInvokerService.PORTLET_CONFIG, requestContext.getPortletConfig()); request.setAttribute(PortletInvokerService.PORTLET_REQUEST, request); request.setAttribute(PortletInvokerService.PORTLET_RESPONSE, response);