Note that there are some explanatory texts on larger screens.

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

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload