• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is the use of flush in jsp:include?

 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


This code will include second.jsp in current page and sends a parameter to second.jsp.

What is the use of flush in this code?

Could any body tell me any other uses of these tags.

Thanks a lot.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are we really have any flush attribute under <jsp:include> element?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you look it up in the JSP specification? If you are writing JSPs and don't have a copy of the specification handy, you are doing it wrong.
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where I can find this jsp specification?

Please help.
Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP 2.0 Specification

If you're not using JSP 2.0, you'll need to do some legwork on your own and find the appropriate specification.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here it is.

[edited: Got collision with bear]
[ May 10, 2005: Message edited by: Adeel Ansari ]
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear & Adeel,
I am using J2EE 1.4. I don't know about JSP version specifically. Will it be OK to use this specification.
Could you please tell me some good way of studying JSP & Servlet.
Thanks a lot.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Adeel Ansari:
Are we really have any flush attribute under <jsp:include> element?


Yes, there is a flush attribute. It's mandatory (though most JSP engines seem to implicitly set it to true if it's not there) and at the moment can only have the value "true" (unless things recently changed).
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Jeroen. I know that.
I just want Rathi to look at JSP specifications.

Final JSP 2.0 Spec says:

flush - Optional boolean attribute. If the value is true, the buffer is
flushed now. The default value is false.
[ May 11, 2005: Message edited by: Adeel Ansari ]
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Adeel Ansari:
If the value is true, the buffer is flushed now.


What is the meaning of this line?
Thanks.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by rathi ji:
What is the meaning of this line?


As its name suggests, flush indicates whether any existing buffer should be flushed before reading in the included content.
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I meants was, which buffer you are talking about?
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic