I already have two filters, which typically checks for a valid session. If session is valid it'll redirect to the ExpenseDetailsManagement.html else ExpenseManagementLogin.html. The web.xml config looks like
<filter>
<filter-name>ExpenseAuthentication</filter-name>
<filter-class>com.pricar.hibernate.ExpenseAuthentication</filter-class>
</filter>
<filter>
<filter-name>ExpenseAuthenticationFilter</filter-name>
<filter-class>com.pricar.hibernate.ExpenseAuthenticationFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ExpenseAuthentication</filter-name>
<url-pattern>*/ExpenseDetailsManagement.html</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>ExpenseAuthenticationFilter</filter-name>
<url-pattern>*/ExpenseManagementLogin.html</url-pattern>
</filter-mapping>
The above two were working fine.
The application path looks like
http://localhost:8080/Hibernate/ExpenseManagementLogin.html
If I try with http://localhost:8080/Hibernate, then ExpenseManagementLogin.htmlis loading
even if I have a valid session.
For that I tried some url-mapping-patterns like Hibernate/, /Hibernate/, /* then
it ends with infinite looping or resource not found error.
My web-app just have two HTML pages, one for login and another for app-stuff.
Any suggestions?