com.opensymphony.webwork.dispatcher
Class FilterDispatcherCompatWeblogic61
java.lang.Object
com.opensymphony.webwork.dispatcher.FilterDispatcher
com.opensymphony.webwork.dispatcher.FilterDispatcherCompatWeblogic61
- All Implemented Interfaces:
- WebWorkStatics, Filter
public class FilterDispatcherCompatWeblogic61
- extends FilterDispatcher
- implements Filter
When running Weblogic Server 6.1, this class should be
specified in web.xml instead of FilterDispatcher
.
This class properly handles the weblogic.jar handling
of servlet filters. There is one serious incompatibility, and
that is that while FilterDispatcher.init(FilterConfig)
throws a ServletException
, this class's method
setFilterConfig(FilterConfig)
does not throw
the exception. Since setFilterConfig(FilterConfig)
invokes FilterDispatcher.init(FilterConfig)
, the setter
must "swallow" the exception. This it does by logging the
exception as an error.
- Version:
- $Id: FilterDispatcherCompatWeblogic61.java 2339 2006-03-08 20:28:56Z rainerh $
- Author:
- Scott N. Smith scottnelsonsmith@yahoo.com
Methods inherited from class com.opensymphony.webwork.dispatcher.FilterDispatcher |
afterActionInvocation, beforeActionInvocation, checkUrl, copy, createComponentManager, destroy, doFilter, findInputStream, findStaticResource, init, parse, setupContainer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilterDispatcherCompatWeblogic61
public FilterDispatcherCompatWeblogic61()
setFilterConfig
public void setFilterConfig(FilterConfig filterConfig)
- dummy setter for
FilterDispatcher.filterConfig
; this method
sets up the ServletContextSingleton
with
the servlet context from the filter configuration.
This is needed by Weblogic Server 6.1 because it
uses a slightly obsolete Servlet 2.3-minus spec
whose Filter
interface requires this method.
- Parameters:
filterConfig
- the filter configuration.
getServletContext
protected ServletContext getServletContext(HttpSession session)
- answers the servlet context.
Servlet 2.3 specifies that this can be retrieved from
the session. Unfortunately, weblogic.jar can only retrieve
the servlet context from the filter config. Hence, this
returns the servlet context from the singleton that was
setup by
setFilterConfig(FilterConfig)
.
- Overrides:
getServletContext
in class FilterDispatcher
- Parameters:
session
- the HTTP session. Not used
- Returns:
- the servlet context.
getFilterConfig
public FilterConfig getFilterConfig()
- This method is required by Weblogic 6.1 SP4 because
they defined this as a required method just before
the Servlet 2.3 specification was finalized.
- Overrides:
getFilterConfig
in class FilterDispatcher
- Returns:
- the filter's filter configuration