This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Servlet filters does not work correctly  RSS feed

 
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
 
Saloon Keeper
Posts: 9234
177
  • 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: 9234
177
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!