Java uses something called Pass By Value. This means that when you pass an object to a method, the method receives a copy of the reference to the object, not the original reference to the object in the caller. Changing the "output" reference in handleRequest does not change the value of "output" where you called it. What you can do is change the contents of output in handleRequest. Since the two references point to the same instance of OutputStream, you would get the desired result.
I think it is a better practice to use a return value rather than to change a method parameter (that's why Java is Pass By Value in the first place). It is easier to see where changes are taking place in the code and has less of a chance for unintended side effects.