Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Return value of doAfterBody

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

In Deshmukh's SCWCD exam Study Kit (page: 324), it specifies EVAL_BODY_BUFFERED as one of the return values of doAfterBody. I can't find this as a return value of this method in the specs or API. Is it a mistake or a change in the latest specs ?

Thanks
Vipin
 
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vipin.

Only the BodyTag interface can return that value.


BodyTag interface
The BodyTag interface extends IterationTag by defining additional methods that let a tag handler manipulate the content of evaluating its body:

* The doStartTag() method can return SKIP_BODY, EVAL_BODY_INCLUDE, or EVAL_BODY_BUFFERED.

* If EVAL_BODY_INCLUDE or SKIP_BODY is returned, then evaluation happens as in IterationTag.

* If EVAL_BODY_BUFFERED is returned, setBodyContent() is invoked, doInitBody() is invoked, the body is evaluated, doAfterBody() is invoked, and then, after zero or more iterations, doEndTag() is invoked. The doAfterBody() element returns EVAL_BODY_AGAIN or EVAL_BODY_BUFFERED to continue evaluating the page and SKIP_BODY to stop the iteration.

 
Vipin Mohan
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Jacques

Can you tell me where I can find this line - "The doAfterBody() element returns EVAL_BODY_AGAIN or EVAL_BODY_BUFFERED to continue evaluating the page and SKIP_BODY to stop the iteration."
I just checked the APIs at http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/jsp/tagext/BodyTag.html
But I could not find this information.
Please advice,

Thanks
Vipin
 
Vipin Mohan
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys

Can anyone help me with the above question ?

I have another question troubling me. I thought that request attributes are thread safe because the request object is scoped within the service method. But section SRV.2.3.3.3 in the specs state that the "Implementations of the request and response objects are not guaranteed to be thread
safe. This means that they should only be used within the scope of the request handling thread." How can they be used in any other threads ?
Are we talking about the threads started by the programmer from within the service method ? Can someone please explain ?

Thanks
Vipin
 
Jacques Bosch
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I just checked the APIs at http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/jsp/tagext/BodyTag.html
But I could not find this information.
Please advice,


You seem to be checking the 1.3 info. I think it was only added in 1.4. Check out the 1.4 specs.

Jacques
 
Vipin Mohan
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Jacques

I have checked the latest specs also, but there is no such information.
I would appreciate if you can send me a link where I can read this.

Thanks in advance
Vipin
 
Jacques Bosch
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vipin.
Perhaps this link will be of some help.:

http://www.jdiscuss.com/Enthuse/jsp/ViewPosts.jsp?forumid=26&topicid=635

J
 
This cake looks terrible, but it tastes great! Now take a bite out of this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic