1 Reply Latest reply on Sep 21, 2008 9:30 PM by troy.sellers

    Filtering requests to /portal context

    troy.sellers

      Hi All,

      Can someone let me know how I would get a servlet filter working to filter /portal requests? I want to intercept these requests before they get to the portal.

      Is this possible? Is this a good idea? Where can I find out about strategies for doing this kind of thing?

      Cheers,
      Troy

        • 1. Re: Filtering requests to /portal context
          troy.sellers


          Just to narrow this question.

          I have created my servlet filter and have updated the web.xml file in the portal-server.war directory.

          The filter entry

           <filter>
           <filter-name>mobileFilter</filter-name>
           <filter-class>com.axegroup.jboss.servlet.filters.MobileDeviceFilter</filter-class>
           </filter>
           <filter-mapping>
           <filter-name>mobileFilter</filter-name>
           <url-pattern>/*</url-pattern>
           </filter-mapping>
          


          This works, in that it calls my class before processing the portal request.
          However, I want to apply this to context /portal and all children of this.
          When I enter the
           <filter-mapping>
           <filter-name>mobileFilter</filter-name>
           <url-pattern>/portal</url-pattern>
           </filter-mapping>
          

          context in the mapping my class is no longer executed.

          Any ideas here?

          Cheers,
          Troy