This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSP and the fly likes PageContect's pushBody() & popBody() Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "PageContect Watch "PageContect New topic
Author

PageContect's pushBody() & popBody()

Joseph Sweet
Ranch Hand

Joined: Jan 29, 2005
Posts: 327
Hi to All

Could you please explain to me what these two methods pushBody() & popBody() of PageContext do.

I am reading the API over and over but cannot figure out what they want to say.

The rest of the methods are pretty clear.

Thanks!



We must know, we will know. -- David Hilbert
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Is this a particular implementation that you are looking at?

Where did you find: "PageContext do"?.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Joseph Sweet
Ranch Hand

Joined: Jan 29, 2005
Posts: 327
I don't get your question but look,

If you read what the API says in the two links I have mentioned above, there is an explanation there regarding what those methods do.

I don't understand that explanation.

public BodyContent pushBody()

Return a new BodyContent object (BodyContent of what?), save the current "out" JspWriter (save where?), and update (update with what data?) the value of the "out" attribute in the page scope attribute namespace of the PageContext (Hold on, this API does not mention earlier that the page scope of this PageContext has a "out" attribute. I thought the PageContext just has that attribute with no specific scope.)

What is this all process good for?

[ July 28, 2007: Message edited by: Joseph Sweet ]
subodh gupta
Ranch Hand

Joined: Jul 23, 2007
Posts: 203
I don't get your question but look,

If you read what the API says in the two links I have mentioned above, there is an explanation there regarding what those methods do.

I don't understand that explanation.


quote:
--------------------------------------------------------------------------------
public BodyContent pushBody()

Return a new BodyContent object (BodyContent of what?), save the current "out" JspWriter (save where?), and update (update with what data?) the value of the "out" attribute in the page scope attribute namespace of the PageContext (Hold on, this API does not mention earlier that the page scope of this PageContext has a "out" attribute. I thought the PageContext just has that attribute with no specific scope.)

What is this all process good for?
--------------------------------------------------------------------------------

1) BodyContent of your JSP
2) I think your content will saved in some temprary loction before updating the jsp view
3) PageContext has most of the objects you need in taglib including the out object


http://subodh-gupta.blogspot.com
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: PageContect's pushBody() & popBody()
 
Similar Threads
encodeURL() and encodeRedirectURL()
jsp resonse
PageContext name table
global.jsa
how to make remeber me service