I have j2ee web app that uses filter to determine the timeout period. If the current time is longer than the last access time for a certain length. it will redirects to a logout page. But I got error: java.lang.IllegalStateException: Cannot forward after response has been committed. I know this error would occur if there is already some output of the page. But this is from a filter class. It's mapped to /* and is called before accessing any page. Why it's still complain this error?