• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

what is empty tag?

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is empty tag the tag with <body-content>empty</body-content> in its tld file?
 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jing Teng:
is empty tag the tag with <body-content>empty</body-content> in its tld file?



what happen if I put body in my JSP even in tld it specify the body should be empty?compile error?
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
an empty tag is a tag that has no body, i.e. nothing between the opening and the closing tag
You can use the short form
<empty-tag />
or the normal form
<empty-tag></empty-tag>
HIH
------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform
 
Win Yu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how about <empty-tag attriname="value"/>, can I call it empty tag.
 
Valentin Crettaz
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
About what I said before, I'm not sure anymore if you were talking about conventional XML empty tag or custom action empty tag
Because if you were talking about the second one, then you are right, a custom action tag that has no body is declared in the TLD file as <bodycontent>empty</bodycontent>
Please tell me...
------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic