Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts2.dispatcher
Class FilterDispatcherCompatWeblogic61

    java.lang.Object
      org.apache.struts2.dispatcher.FilterDispatcher
          org.apache.struts2.dispatcher.FilterDispatcherCompatWeblogic61

All Implemented Interfaces:
  javax.servlet.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

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_ACTION_TAG_INVOCATION, STRUTS_PORTLET_CONTEXT`

Constructor Summary
`FilterDispatcherCompatWeblogic61()` Deprecated.

Method Summary
`javax.servlet.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 javax.servlet.ServletContext` | `getServletContext(javax.servlet.http.HttpSession session)` Deprecated. answers the servlet context.
`void` | `setFilterConfig(javax.servlet.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, createDispatcher, destroy, doFilter, getDevModeOverride, getServletContext, init, overrideDevMode, prepareDispatcherAndWrapRequest, setActionMapper, setStaticResourceLoader`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FilterDispatcherCompatWeblogic61

    public FilterDispatcherCompatWeblogic61()

  Deprecated.

Method Detail

### setFilterConfig

    public void setFilterConfig(javax.servlet.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 javax.servlet.ServletContext getServletContext(javax.servlet.http.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 javax.servlet.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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000–2018 Apache Software Foundation. All rights reserved.