Only 44 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet filters does not work correctly  RSS feed

 
ramchander kethireddy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi my code is below

my authentication filter class is below

here is my web.xml

my filter cod does not prevent me to access jsp pages after log out or without a session

please help
 
Stephan van Hulst
Saloon Keeper
Posts: 6966
109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ramchander Kethireddy,

When you post code, please put it within [code] tags. Please don't use mixed spaces and tabs for indentation. Put spaces around operators and braces, and after colons and commas.

I've edited your post to make it more easy to read. Next time, please use the "Preview" button after you've written your post to see what it looks like before you submit it.
 
Stephan van Hulst
Saloon Keeper
Posts: 6966
109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure that the request goes through the AuthenticationFilter first? Can you double check that the application logs "Requested Resource::" with the URL?

If it does, you should put a breakpoint on that method and step through it to see what the values of session and uri are.

Why are you not using a high level MVC framework to handle this for you? I'm pretty sure it's much easier and cleaner to write middleware like this in a framework like Spring.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!