Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!

  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Filters and HTTP variables  RSS feed

Sita Kodali
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there
Implementing filters does not seemt to be straight forward.
I was working on a filter that reads cookies placed by a previous page and perform filtering activity based on them. However, in my doFilter(ServletRequest, ServletResponse, FilterChain) method, after or before casting ServletRequest to HttpServletRequest, I can not read cookies (believe, there exist cookies and they can be read using any jsp or servlet or even javascript).
In just plain filters speak, it does not work and you can't read any Http related server variables.
But there is an ugly hack - add some servlet related stuff and it works!
Does anyone have seen this behaviour (with Tomcat4.x on Windows and linux).
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!