Ah, my bad, I haven't realized that I did the wrong question. What I want is to redirect, but before that, use setStatusCode(). The problem is that, even with setNotModified(), the statusCode is deleted.