org.appng.core.controller.filter

## Class MSOfficeUserAgentFilter

- java.lang.Object
- - org.appng.core.controller.filter.MSOfficeUserAgentFilter

- All Implemented Interfaces:
    javax.servlet.Filter

      public class MSOfficeUserAgentFilter
      extends Object
      implements javax.servlet.Filter

  This `Filter` is a workaround for a bug in Microsoft Office which causes the http-session to get lost if a link is being opened from inside a Microsoft Office document.
  See KB 899927 for details.

  The solution is to send a meta refresh if MS Office is detected as user-agent.

  To enable this filter, add this to the web.xml:

       <filter>
        <filter-name>MSOfficeUserAgentFilter</filter-name>
        <filter-class>org.appng.core.controller.filter.MSOfficeUserAgentFilter</filter-class>
       </filter>
       <filter-mapping>
        <filter-name>MSOfficeUserAgentFilter</filter-name>
        <servlet-name>controller</servlet-name>
        <dispatcher>REQUEST</dispatcher>
       </filter-mapping>

  Author:
    Matthias Müller

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MSOfficeUserAgentFilter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `destroy()`
    `void` | `doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)`
    `void` | `init(javax.servlet.FilterConfig filterConfig)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MSOfficeUserAgentFilter

          public MSOfficeUserAgentFilter()

  - ### Method Detail

    - #### init

          public void init(javax.servlet.FilterConfig filterConfig)
                    throws javax.servlet.ServletException

      Specified by:
        `init` in interface `javax.servlet.Filter`
      Throws:
        `javax.servlet.ServletException`

    - #### doFilter

          public void doFilter(javax.servlet.ServletRequest request,
                               javax.servlet.ServletResponse response,
                               javax.servlet.FilterChain chain)
                        throws IOException,
                               javax.servlet.ServletException

      Specified by:
        `doFilter` in interface `javax.servlet.Filter`
      Throws:
        `IOException`
        `javax.servlet.ServletException`

    - #### destroy

          public void destroy()

      Specified by:
        `destroy` in interface `javax.servlet.Filter`

Copyright © 2011–2023 aiticon GmbH. All rights reserved.