This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JSP and the fly likes Is this an empty Tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Is this an empty Tag" Watch "Is this an empty Tag" New topic
Author

Is this an empty Tag

Deepan Devadasan
Ranch Hand

Joined: Jan 25, 2007
Posts: 226
Hi Buddies,

We know

1)<x:foo>
2)<x:foo></x:foo>

are empty tags

Then the following too should obviously be an empty tag
<x:foo><%-- This is an empty element --%></x:foo>

Am I correct?


Theepan Thevathasan
SCJP 1.4, SCWCD 1.4, SCMAD 1.0 SCBCD 1.3, MCP(.Net Frm 2.0 App Dev Fdn)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60082
    
  65

<x:foo> is not an empty tag.

And no, a tag containing a comment is not empty.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Deepan Devadasan
Ranch Hand

Joined: Jan 25, 2007
Posts: 226
thanks Bear,

It was intended to be <x:foo/>javascript: x()
Smile

Thanks a lot again
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is this an empty Tag
 
Similar Threads
Custom tag Qs
Tag file problem
what is empty tag?
Tag file to declare that the Tag must not have a body
jsp:getProperty