• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

page buffer="4096kb"

 
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 3904
43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic