> i had a code to clear all the history of my browser
Now that would be a bit of a security nightmare wouldn't it. What is it you are trying to do exactly, do you want a
page or pages to not be cached in the browser cache? you seem to be sending a redirect before setting the response
Also you don't say where the exception is thrown, or the context in which this code is running, a servlet filter maybe?