portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shins...@apache.org
Subject svn commit: r391446 - /portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/login/filter/PortalRequestWrapper.java
Date Tue, 04 Apr 2006 23:31:44 GMT
Author: shinsuke
Date: Tue Apr  4 16:31:43 2006
New Revision: 391446

URL: http://svn.apache.org/viewcvs?rev=391446&view=rev
Log:
ClassCastException occurs when forwarding request. so, back to HttpServletRequestWrapper.

Modified:
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/login/filter/PortalRequestWrapper.java

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/login/filter/PortalRequestWrapper.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/login/filter/PortalRequestWrapper.java?rev=391446&r1=391445&r2=391446&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/login/filter/PortalRequestWrapper.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/login/filter/PortalRequestWrapper.java
Tue Apr  4 16:31:43 2006
@@ -15,29 +15,19 @@
  */
 package org.apache.jetspeed.login.filter;
 
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
 import java.security.Principal;
-import java.util.Enumeration;
-import java.util.Locale;
-import java.util.Map;
 
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletInputStream;
-import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpServletRequestWrapper;
 
-public class PortalRequestWrapper implements HttpServletRequest
+public class PortalRequestWrapper extends HttpServletRequestWrapper
 {
     private Principal userPrincipal = null;
-    private HttpServletRequest request=null;
     
     public PortalRequestWrapper(HttpServletRequest request,
             Principal userPrincipal)
     {
-        this.request = request;
+        super(request);
         this.userPrincipal = userPrincipal;
     }
 
@@ -65,390 +55,6 @@
         {
             return null;
         }
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#getAttribute(java.lang.String)
-     */
-    public Object getAttribute(String arg0)
-    {
-        return request.getAttribute(arg0);
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#getAttributeNames()
-     */
-    public Enumeration getAttributeNames()
-    {
-        return request.getAttributeNames();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#getAuthType()
-     */
-    public String getAuthType()
-    {
-        return request.getAuthType();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#getCharacterEncoding()
-     */
-    public String getCharacterEncoding()
-    {
-        return request.getCharacterEncoding();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#getContentLength()
-     */
-    public int getContentLength()
-    {
-        return request.getContentLength();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#getContentType()
-     */
-    public String getContentType()
-    {
-        return request.getContentType();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#getContextPath()
-     */
-    public String getContextPath()
-    {
-        return request.getContextPath();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#getCookies()
-     */
-    public Cookie[] getCookies()
-    {
-        return request.getCookies();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#getDateHeader(java.lang.String)
-     */
-    public long getDateHeader(String arg0)
-    {
-        return request.getDateHeader(arg0);
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#getHeader(java.lang.String)
-     */
-    public String getHeader(String arg0)
-    {
-        return request.getHeader(arg0);
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#getHeaderNames()
-     */
-    public Enumeration getHeaderNames()
-    {
-        return request.getHeaderNames();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#getHeaders(java.lang.String)
-     */
-    public Enumeration getHeaders(String arg0)
-    {
-        return request.getHeaders(arg0);
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#getInputStream()
-     */
-    public ServletInputStream getInputStream() throws IOException
-    {
-        return request.getInputStream();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#getIntHeader(java.lang.String)
-     */
-    public int getIntHeader(String arg0)
-    {
-        return request.getIntHeader(arg0);
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#getLocale()
-     */
-    public Locale getLocale()
-    {
-        return request.getLocale();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#getLocales()
-     */
-    public Enumeration getLocales()
-    {
-        return request.getLocales();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#getMethod()
-     */
-    public String getMethod()
-    {
-        return request.getMethod();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#getParameter(java.lang.String)
-     */
-    public String getParameter(String arg0)
-    {
-        return request.getParameter(arg0);
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#getParameterMap()
-     */
-    public Map getParameterMap()
-    {
-        return request.getParameterMap();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#getParameterNames()
-     */
-    public Enumeration getParameterNames()
-    {
-        return request.getParameterNames();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#getParameterValues(java.lang.String)
-     */
-    public String[] getParameterValues(String arg0)
-    {
-        return request.getParameterValues(arg0);
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#getPathInfo()
-     */
-    public String getPathInfo()
-    {
-        return request.getPathInfo();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#getPathTranslated()
-     */
-    public String getPathTranslated()
-    {
-        return request.getPathTranslated();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#getProtocol()
-     */
-    public String getProtocol()
-    {
-        return request.getProtocol();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#getQueryString()
-     */
-    public String getQueryString()
-    {
-        return request.getQueryString();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#getReader()
-     */
-    public BufferedReader getReader() throws IOException
-    {
-        return request.getReader();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#getRealPath(java.lang.String)
-     */
-    public String getRealPath(String arg0)
-    {
-        return request.getRealPath(arg0);
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#getRemoteAddr()
-     */
-    public String getRemoteAddr()
-    {
-        return request.getRemoteAddr();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#getRemoteHost()
-     */
-    public String getRemoteHost()
-    {
-        return request.getRemoteHost();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#getRequestDispatcher(java.lang.String)
-     */
-    public RequestDispatcher getRequestDispatcher(String arg0)
-    {
-        return request.getRequestDispatcher(arg0);
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#getRequestedSessionId()
-     */
-    public String getRequestedSessionId()
-    {
-        return request.getRequestedSessionId();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#getRequestURI()
-     */
-    public String getRequestURI()
-    {
-        return request.getRequestURI();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#getRequestURL()
-     */
-    public StringBuffer getRequestURL()
-    {
-        return request.getRequestURL();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#getScheme()
-     */
-    public String getScheme()
-    {
-        return request.getScheme();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#getServerName()
-     */
-    public String getServerName()
-    {
-        return request.getServerName();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#getServerPort()
-     */
-    public int getServerPort()
-    {
-        return request.getServerPort();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#getServletPath()
-     */
-    public String getServletPath()
-    {
-        return request.getServletPath();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#getSession()
-     */
-    public HttpSession getSession()
-    {
-        return request.getSession();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#getSession(boolean)
-     */
-    public HttpSession getSession(boolean arg0)
-    {
-        return request.getSession(arg0);
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#isRequestedSessionIdFromCookie()
-     */
-    public boolean isRequestedSessionIdFromCookie()
-    {
-        return request.isRequestedSessionIdFromCookie();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#isRequestedSessionIdFromUrl()
-     */
-    public boolean isRequestedSessionIdFromUrl()
-    {
-        return request.isRequestedSessionIdFromUrl();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#isRequestedSessionIdFromURL()
-     */
-    public boolean isRequestedSessionIdFromURL()
-    {
-        return request.isRequestedSessionIdFromURL();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#isRequestedSessionIdValid()
-     */
-    public boolean isRequestedSessionIdValid()
-    {
-        return request.isRequestedSessionIdValid();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#isSecure()
-     */
-    public boolean isSecure()
-    {
-        return request.isSecure();
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.http.HttpServletRequest#isUserInRole(java.lang.String)
-     */
-    public boolean isUserInRole(String arg0)
-    {
-        return request.isUserInRole(arg0);
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#removeAttribute(java.lang.String)
-     */
-    public void removeAttribute(String arg0)
-    {
-        request.removeAttribute(arg0);
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#setAttribute(java.lang.String, java.lang.Object)
-     */
-    public void setAttribute(String arg0, Object arg1)
-    {
-        request.setAttribute(arg0, arg1);
-    }
-
-    /* (non-Javadoc)
-     * @see javax.servlet.ServletRequest#setCharacterEncoding(java.lang.String)
-     */
-    public void setCharacterEncoding(String arg0) throws UnsupportedEncodingException
-    {
-        request.setCharacterEncoding(arg0);
     }
 
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message