• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

page buffer="4096kb"

 
Jack Lau
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I create a jsp as follow:


Do not know why the content of the page will display?
I expect that it is not enough 4096kb so the content will not be send to client. Can anyone tell me why it sends the content to client?

Thanks in advance!
Jack
 
Mikalai Zaikin
Ranch Hand
Posts: 3371
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sends content to the client, because when _jspService(...) method finishes, the buffer which was used for that page is flushed to the client.

The purpose of buffer is to accumulate many "println(...)" outputs and then send to the client all content in one action.

The practical use of buffer is: if you have big buffer, and in the middle of the page you realise that you need to display ANOTHER page - you can forward to another page and since nothing was sent yet to the client, you don't get "IllegalStateException".

You can read more about 'Action jsp:forward' here

regards,
MZ
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic