Two Filters in one webapp

"Ivan Latysh" <ivan-HlKOwzbrASxWk0Htik3J/[email protected]> Thu, 22 Jan 2004 13:30:41 -0500
Newsgroups gmane.comp.java.securityfilter.user
Message-ID <012001c3e115$d8330150$8700000a@IvanLatysh>
Hi All.

I have a webapp, where I have to have 2 sets of login form, totally =
different.
And I thought that I can do following:

    <filter>
        <filter-name>area1</filter-name>
        =
<filter-class>org.securityfilter.filter.SecurityFilter</filter-class>
        <init-param>
            <param-name>config</param-name>
            <param-value>config1.xml</param-value>
        </init-param>
        <init-param>
            <param-name>validate</param-name>
            <param-value>false</param-value>
        </init-param>
    </filter>

    <filter>
        <filter-name>area2</filter-name>
        =
<filter-class>org.securityfilter.filter.SecurityFilter</filter-class>
        <init-param>
            <param-name>config</param-name>
            <param-value>config2.xml</param-value>
        </init-param>
        <init-param>
            <param-name>validate</param-name>
            <param-value>false</param-value>
        </init-param>
    </filter>

    <filter-mapping>
        <filter-name>area1</filter-name>
        <url-pattern>/area1/*</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>area2</filter-name>
        <url-pattern>/area2/*</url-pattern>
    </filter-mapping>

It works fine, until user logged in, after user logged in, he get's =
forbidden when he trying to access file from another area.
AFAIK user credentials stored inside the session, and security filter =
should let the user thru. Both areas has the same role.

Please help me with it.



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn