It works fine but I just want to understand How it works: Is the body content always written to the JSP page when the body is evaluated (even if you haven't written any code)?
It seems to be something like that because when you run the example code the body content is written times, though only the Last call to actually seems to print anything. (The previous calls just increment the counter.)
But how does really work? Maybe the body content is automatically written to some buffer at each iteration and getPreviousOut prints the whole content of that buffer? But then if you'd only want to print out the last two iterations (for some reason) that would not be possible, or would it?
It would be nice if someone could shred some light on this issue for me.