File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes PageContect's pushBody() & popBody() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
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://aspose.com/file-tools
 
subject: PageContect's pushBody() & popBody()