org.apache.struts2.dispatcher
Class FilterDispatcherCompatWeblogic61

java.lang.Object
  extended by org.apache.struts2.dispatcher.FilterDispatcher
      extended by org.apache.struts2.dispatcher.FilterDispatcherCompatWeblogic61
All Implemented Interfaces:
Filter, StrutsStatics

Deprecated. Since Struts 2.1.3 as it probably isn't used anymore

public class FilterDispatcherCompatWeblogic61
extends FilterDispatcher

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.


Field Summary
private static Logger LOG
          Deprecated.  
 
Fields inherited from class org.apache.struts2.dispatcher.FilterDispatcher
dispatcher, staticResourceLoader
 
Fields inherited from interface org.apache.struts2.StrutsStatics
HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERVLET_CONTEXT, SERVLET_DISPATCHER, STRUTS_PORTLET_CONTEXT
 
Constructor Summary
FilterDispatcherCompatWeblogic61()
          Deprecated.  
 
Method Summary
 FilterConfig getFilterConfig()
          Deprecated. 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.
protected  ServletContext getServletContext(HttpSession session)
          Deprecated. answers the servlet context.
 void setFilterConfig(FilterConfig filterConfig)
          Deprecated. dummy setter for FilterDispatcher.filterConfig; this method sets up the ServletContextSingleton with the servlet context from the filter configuration.
 
Methods inherited from class org.apache.struts2.dispatcher.FilterDispatcher
createDispatcher, destroy, doFilter, getServletContext, init, prepareDispatcherAndWrapRequest, setActionMapper, setStaticResourceLoader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static Logger LOG
Deprecated. 
Constructor Detail

FilterDispatcherCompatWeblogic61

public FilterDispatcherCompatWeblogic61()
Deprecated. 
Method Detail

setFilterConfig

public void setFilterConfig(FilterConfig filterConfig)
Deprecated. 
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)
Deprecated. 
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).

Parameters:
session - the HTTP session. Not used
Returns:
the servlet context.

getFilterConfig

public FilterConfig getFilterConfig()
Deprecated. 
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


Copyright © 2000-2009 Apache Software Foundation. All Rights Reserved.