Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

filters

 
Arvind Subramanian
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Mohamed Inayath
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic