• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

empty body TLD & doStartTag return value

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In HFSJ pg 534 given

if TLD declares an empty body, doStartTag must return SKIP_BODY..

But i tested in Tomcat 5.0.28.. It is not giving any error.. Here is my code

tld file
========


java file
=========


JSP file
========



I am getting following output in TOMCAT


Is this bug in TOMCAT or bug in HFSJ? Anyone know what is in SPEC? Help me please

Thanks
Radmika
 
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

If you look into the JSP spec, there are actually two statements.

If the TagLibraryDescriptor file indicates that the action must always have an empty element body, by a <body-content> entry of "empty", then the doStartTag() method must return SKIP_BODY.

Note that which methods are invoked after the doStartTag() depends on both the return value and on if the custom action elements is empty or not in the JSP page, not on how it's declared in the TLD



Not easy to understand for me but point out that doStartTag() can have other value when the body-conetent is "empty"

Thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic