Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Flush and jsp:forward

 
amarkirt saroay
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The jsp specs say:

For A jsp:forward action :
If the page output is buffered, the buffer is cleared prior to forwarding. //What is meant by buffer? where does it exist actually? i am unable to imagine what it is?
If the page output is buffered and the buffer was flushed, an attempt to //What does flushing mean ?I want to know in a layman's sense,can anyone help me understand?
forward the request will result in an IllegalStateException.
If the page output was unbuffered and anything has been written to it, an //What is unbuffered? is it usage of out.print etc?
attempt to forward the request will result in an IllegalStateException.



Please let me know what these terms mean ,I am not geting them.(Please check the questions in comments above)
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


check this
 
Nabila Mohammad
Ranch Hand
Posts: 664
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Buffer is like an intermediate temporaray storage when you are writing or reading from a file.
Suppose in case of writing

you -------------> Buffer ----------> file

When it says you have "flushed" it means the contents of the buffer have been emptied and written to your output file.No more data exists in the Buffer.
Its kind of a medium between you and file , data stays there only untill you have written or read to/from file.
Now if you attempt to change anything like the display format or something , it would mean you are implementing changes on the data which does not exist( coz the buffer is empty and you have already written )

Its not very precise but I hope you got a general idea of what Buffer is...
 
amarkirt saroay
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic