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

EVAL_BODY_BUFFERED and invoking tag relation

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends
HFSJ book page 534 says- if i return EVAL_BODY_BUFFERED even though the invoking tag is empty,then container knows that there is no body so it just skips to doEndTag() method.
my dought is what should be the value of <body-content> subelement in TLD in this case?

one more point in same page says-if <body-content>empty</body-content> then you must not return EVAL_BODY_BUFFERED or EVAL_BODY_INCLUDE from doStartTag() method .any suggestions about this .please let me know



thanks in advance
 
Ranch Hand
Posts: 188
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

For you first dout

even though the invoking tag is empty

ideally speaking in this case your <body-content> should be empty and you should not return EVAL_BODY_BUFFERED ... rather return BODY_SKIP.

However if you decide that you have an affection for EVAL_BODY_BUFFERED then you can have your <body-content> as any of the following jsp,tagdependent,scriptless.

But you cannot have it as empty & then return EVAL_BODY_BUFFERED.


Now for the second dout

<body-content>empty</body-content> then you must not return EVAL_BODY_BUFFERED or EVAL_BODY_INCLUDE from doStartTag() method



This is a little obvious .... if <body-content> is empty why are you trying to evaluate it ???

I hope this is usefull !!!

If anyone thinks there are corrections needed in the explanation .. please post them . !!
 
The world's cheapest jedi mind trick: "Aw c'mon, why not read this tiny ad?"
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic