How to work with Java Filters to redirect the user if is logued.
I have in my application a few url:

/

/SignIn

/SignUp

In "/" is my homepage where the user can log in into my app.

I want like Gmail and other services that "/", "/SignUp", "/SignIn" will be available to the users not loged in. And when the user logs in into my application that if he goes to "/" or "/SignUp" or "/SignIn" redirect him into my app backend page "/Backend".

How can I deal with this with Java Filters?

Show I create one filter and for this filter many mappings in this way?

    <filter-mapping>
     <filter-name>AuthorizationFilter</filter-name>
     <url-pattern>/</url-pattern>
  </filter-mapping>

    <filter-mapping>
         <filter-name>AuthorizationFilter</filter-name>
         <url-pattern>/SignIn</url-pattern>
      </filter-mapping>

etc?

How to work with Java Filters to redirect the user if is logued.
===

I have in my application a few url:

/

/SignIn

/SignUp

In "/" is my homepage where the user can log in into my app.

I want like Gmail and other services that "/", "/SignUp", "/SignIn" will be available to the users not loged in. And when the user logs in into my application that if he goes to "/" or "/SignUp" or "/SignIn" redirect him into my app backend page "/Backend".

How can I deal with this with Java Filters?

Show I create one filter and for this filter many mappings in this way?

    <filter-mapping>
     <filter-name>AuthorizationFilter</filter-name>
     <url-pattern>/</url-pattern>
  </filter-mapping>

    <filter-mapping>
         <filter-name>AuthorizationFilter</filter-name>
         <url-pattern>/SignIn</url-pattern>
      </filter-mapping>

etc?
