• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

filters

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic