taylor 2004/04/19 14:45:33 Added: commons/src/java/org/apache/jetspeed/portlet StrutsServletContextProviderImpl.java Log: adding J2's StrutsServletContext Provider impl
PR: Obtained from: Submitted by: Reviewed by: CVS: ---------------------------------------------------------------------- CVS: PR: CVS: If this change addresses a PR in the problem report tracking CVS: database, then enter the PR number(s) here. CVS: Obtained from: CVS: If this change has been taken from another system, such as NCSA, CVS: then name the system in this line, otherwise delete it. CVS: Submitted by: CVS: If this code has been contributed to Apache by someone else; i.e., CVS: they sent us a patch or a new module, then include their name/email CVS: address here. If this is your work then delete this line. CVS: Reviewed by: CVS: If we are doing pre-commit code reviews and someone else has CVS: reviewed your changes, include their name(s) here. CVS: If you have not had it reviewed then delete this line. Revision Changes Path 1.1 jakarta-jetspeed-2/commons/src/java/org/apache/jetspeed/portlet/StrutsServletContextProviderImpl.java Index: StrutsServletContextProviderImpl.java =================================================================== /* * Copyright 2000-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jetspeed.portlet; import javax.portlet.GenericPortlet; import javax.portlet.PortletRequest; import javax.portlet.PortletResponse; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponseWrapper; import org.apache.jetspeed.container.JetspeedPortletContext; import org.apache.struts.portlet.StrutsServletContextProvider; /** * StrutsServletContextProviderImpl supplies a StrutsPortlet access to the * Servlet context of a Jetspeed Portlet. * @author <a href="mailto:[EMAIL PROTECTED]">Ate Douma</a> * @version $Id: StrutsServletContextProviderImpl.java,v 1.1 2004/04/19 21:45:33 taylor Exp $ */ public class StrutsServletContextProviderImpl implements StrutsServletContextProvider { public ServletContext getServletContext(GenericPortlet portlet) { return ((JetspeedPortletContext)portlet.getPortletContext()).getServletContext(); } public HttpServletRequest getHttpServletRequest(GenericPortlet portlet, PortletRequest request) { return (HttpServletRequest) ((HttpServletRequestWrapper) request).getRequest(); } public HttpServletResponse getHttpServletResponse(GenericPortlet portlet, PortletResponse response) { return (HttpServletResponse) ((HttpServletResponseWrapper) response).getResponse(); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]