1 16 package org.apache.cocoon.portal.bridges; 17 18 import javax.portlet.GenericPortlet; 19 import javax.portlet.PortletRequest; 20 import javax.portlet.PortletResponse; 21 import javax.servlet.ServletContext ; 22 import javax.servlet.http.HttpServletRequest ; 23 import javax.servlet.http.HttpServletRequestWrapper ; 24 import javax.servlet.http.HttpServletResponse ; 25 import javax.servlet.http.HttpServletResponseWrapper ; 26 27 import org.apache.pluto.core.impl.PortletContextImpl; 28 import org.apache.portals.bridges.common.ServletContextProvider; 29 30 35 public class ServletContextProviderImpl implements ServletContextProvider { 36 37 40 public HttpServletRequest getHttpServletRequest(GenericPortlet portlet, PortletRequest request) { 41 return (HttpServletRequest ) ((HttpServletRequestWrapper ) request).getRequest(); 42 } 43 44 47 public HttpServletResponse getHttpServletResponse(GenericPortlet portlet, PortletResponse response) { 48 return (HttpServletResponse ) ((HttpServletResponseWrapper ) response).getResponse(); 49 } 50 51 54 public ServletContext getServletContext(GenericPortlet portlet) { 55 return ((PortletContextImpl)portlet.getPortletContext()).getServletContext(); 56 } 57 58 } 59 | Popular Tags |