| Author |
filters
|
Arvind Subramanian
Ranch Hand
Joined: Jul 25, 2008
Posts: 84
|
|
i have only one filter in my web app which i used for authentication.
but when i execute it the filter is getting executing thrice. can any one tell me the reason about it
my web .xml has
is there any way to make it execute once
|
"Many of lifes failure are people who did not realize how close they were to success when they gave up."
-Thomas Edison
~ar~stutzen~
|
 |
Mohamed Inayath
Ranch Hand
Joined: Nov 22, 2004
Posts: 124
|
|
The only way it can execute multiple times is when the authorized flag is false and is redirected to the login page.
Otheriwse there is no way it can execute multiple times.
|
 |
Arvind Subramanian
Ranch Hand
Joined: Jul 25, 2008
Posts: 84
|
|
yes you are correct, but is there any other logic reduce that.
And also i have one problem , i cant able to get the img and css for my login page ... is there any other logic to handle this more efficiently
|
 |
Mohamed Inayath
Ranch Hand
Joined: Nov 22, 2004
Posts: 124
|
|
Arvind Subramanian wrote:yes you are correct, but is there any other logic reduce that.
Once the user is authenticated set the token.
Next when the user comes request will be with the user token.
Arvind Subramanian wrote:
And also i have one problem , i cant able to get the img and css for my login page ... is there any other logic to handle this more efficiently
What issue your are getting with this.
Check the path definition, could be a path issue.
|
 |
Arvind Subramanian
Ranch Hand
Joined: Jul 25, 2008
Posts: 84
|
|
|
in url pattern i provided /* , but there is no other way to secure the whole webapplication. is there any way to write exception in filter?
|
 |
Mohamed Inayath
Ranch Hand
Joined: Nov 22, 2004
Posts: 124
|
|
Arvind Subramanian wrote:in url pattern i provided /* , but there is no other way to secure the whole webapplication. is there any way to write exception in filter?
Which URL pattern you are talking about.
I am saying you to check the img source attibute value in your JSP/HTML.
And look where exactly the css file is located.
And Exception filter for what?
|
 |
Arvind Subramanian
Ranch Hand
Joined: Jul 25, 2008
Posts: 84
|
|
i got it fixed ...
the url pattern i mentioned is about web.xml filter tag.
the request are the css and gif request from my login page
|
 |
 |
|
|
subject: filters
|
|
|