This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
I am setting the attribute of the session for logout to null. I am checking the same session variable in the filter for valid login. If the attribute is null, I am trying to prevent caching of the page. This way , I am trying to prevent the user to view the visited pages after logout using Internet Explorer's BACK button.
The conditionally setting of the response headers is not working for me.
Here,s the code: For logout:
I am checking the userLogger attribute of the session in the filter as:
If the condition is removed from the code. The response headers are set and the user is prevented to view the visited pages after logout.
Also, the print statement prints: Response Committed:false.
Note: I am using this in a GRAILS application. Since, the issue is with the response and setting the headers , I have posted it here.
Thanks and regards,
Author and all-around good cowpoke
Joined: Mar 22, 2000
If this was my problem I would use Firefox with live http headers turned on as the client to see what is actually being sent in the response headers.
That code you posted - in what method of the filter does it appear?