This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I don't really fully understand how the 'buffer' value is best set when used in jsp pages. What are factors to consider in changing the default buffer size? I noticed that buffer='none' is even an option. When is this used? Thanks in advance for any comments?
The default value is 8k. In most cases that I've seen people wanting to alter this value, it has been better to redesign the page rather than try to decide on a new value. The main use of the Buffer is to allow you to output data to the client and then change your mind. A better decision would be to decide what you want to output before you start sending it. It also comes in handy when an exception is thrown while a page is being sent. In this case, if the buffer hasn't filled yet, it is cleared and the user is sent to the error page. If the response has already been comitted because the Buffer has been sent, the error page may or may not be sent as well. It shouldn't be sent, but some servers do still send it. In this case it would again be preferable to protect against exceptions rather than making the buffer larger to handle this condition. Hope this helps. Dave