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:
  Filter, StrutsStatics

    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 Log` | `log`

Fields inherited from class org.apache.struts2.dispatcher.FilterDispatcher
`dispatcher`

Fields inherited from interface org.apache.struts2.StrutsStatics
`HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERVLET_CONTEXT, SERVLET_DISPATCHER, STRUTS_PORTLET_CONTEXT`

Constructor Summary
`FilterDispatcherCompatWeblogic61()`

Method Summary
`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.
`protected ServletContext` | `getServletContext(HttpSession session)` answers the servlet context.
`void` | `setFilterConfig(FilterConfig filterConfig)` 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
`copy, createDispatcher, destroy, doFilter, findInputStream, findStaticResource, getContentType, getServletContext, init, parse, prepareDispatcherAndWrapRequest, setActionMapper, setEncoding, setServeStaticBrowserCache, setServeStaticContent`

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

Field Detail

### log

    private static Log log

Constructor Detail

### FilterDispatcherCompatWeblogic61

    public FilterDispatcherCompatWeblogic61()

Method Detail

### 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)`.

  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

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-2007 Apache Software Foundation. All Rights Reserved.