aspose file tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes JSP.2.3.4 Empty Elements - JSP Specs ? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "JSP.2.3.4 Empty Elements - JSP Specs ?" Watch "JSP.2.3.4 Empty Elements - JSP Specs ?" New topic
Author

JSP.2.3.4 Empty Elements - JSP Specs ?

Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

While the following are all non-empty tags:
<foo> </foo>
<foo><%= expression %></foo>
<foo><% scriptlet %></foo>
<foo><bar/></foo>
<foo><!-- a comment --></foo>

While I am (not sure but) comfortable to assume that the last line in NOT empty because it contains a HTML comment which will be transmitted to the client. However, I can't understand why the first line in non-empty?
Am I missing something in the first line?
There seems to be a space, but does that make it non-empty?
Thanks for your help.
- satya


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Ram Dhan Yadav K
Ranch Hand

Joined: Aug 13, 2001
Posts: 321
Hi Madhav,
During translation time of JSP, white space is preserved. So white space means non-empty.


Ram Dhan Yadav (SCJP, SCWCD, SCJA-I, IBM EC(483))
"We are what we repeatedly do. Excellence, then, is not an act, but a habit."
 
 
subject: JSP.2.3.4 Empty Elements - JSP Specs ?
 
Threads others viewed
Custom tag Qs
Doubts in Mock exam HFSJ
Simple and Custom Tags problem
In JSP, How to import a java class that exists in default package?
jsp:getProperty
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture