It's not a secret anymore!
The moose likes Servlets and the fly likes TagLib Again.......... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "TagLib Again.........." Watch "TagLib Again.........." New topic

TagLib Again..........

Manohar Karamballi
Ranch Hand

Joined: Jul 17, 2001
Posts: 227
Hai All!
What exactly getPreviousOut()method of BodyTagSupport will do?

Simon Brown
sharp shooter, and author
Ranch Hand

Joined: May 10, 2000
Posts: 1913
The implicit "out" variable in a JSP represents the JspWriter that allows us to write stuff back from the JSP.
When a body tag is encountered, what happens is that a BodyContent object is created. BodyContent is a subclass of JspWriter and is (if you like) a "scratch pad" or temporary area to which content can be written and if required, manipulated.
It's like a stack meaning that the JspWriter belonging to the JSP page is the "previous out". Of course nested body tags also means creating more BodyContent objects too...
[This message has been edited by Simon Brown (edited August 29, 2001).]
I agree. Here's the link:
subject: TagLib Again..........
It's not a secret anymore!