This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How I can cut the communication between client and server using a filter?

 
raminaa niilian
Ranch Hand
Posts: 551
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thank you for reading my post
How I can cut the communication between client and server using a filter?
for example if user request header has no coockie, i do not allow the request to go to its endpoint and instead i generate some html and send it as response to the client without allowing the request to go in.

Thank you very much.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Write a filter that checks for the cookie and forwards to an error or login page if the cookie is not present.
If the cookie is present, call chain.doFilter.
 
raminaa niilian
Ranch Hand
Posts: 551
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thank you for your reply.
I want the filter to write something in the output instead of redirecting to some other pages.
Is it possible?

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic