Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ways of declaring tags - body-content

 
Lakshmi Narayanan
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know these are ways of declaring empty body-content

1. <mine:test/>
2. <mine:test></mine:test>
3. <mine:test>
<jsp:attribute name="test" value="dummy" />
</mine:test>

Question here is second one
<mine:test> </mine:test>
if valid? that means there are spaces here. is it still consider empty body content.
 
Surajsingh Thakur
Ranch Hand
Posts: 124
Eclipse IDE MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it will be still taken to be a tag with an empty body...
Also <mine:test>
<jsp:attribute name="test">${dummy}</jsp:attribute>
</mine:test>
is the right way
 
Lakshmi Narayanan
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you are right Expression is allowed inside the bpdy of attribute

Are you sure we can have spaces in between the tag so that it is valied empty body.
 
Lakshmi Narayanan
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oops i am confused. jsp:attribute does not have value attibute.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Narayana Bujji:

Question here is second one
<mine:test> </mine:test>
if valid? that means there are spaces here. is it still consider empty body content.[/QB]


nope.... if there is gap then it will not consider as a empty body-content

Hope This Helps
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic