• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

body-content confuse.

 
Anna Wang
Ranch Hand
Posts: 30
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, everyone,

From HFSJ P. 472, it shows:
<body-content> can be: empty, scriptless, tagdependent, JSP in a tag.
I was wondering what is the default value if No <body-content>, is it JSP, right?(I remember I saw this somewhere, not sure)

So, If the tag is simple tag or classic tag, what's the value of <body-content>? Still those four value(empty, scriptless, tagdependent, JSP)? I am confused in this question:

<my:simpleTag>
<%= display %>
</my:simpleTag>

is invalide because body includes a JSP expression.

Can anybody explain this? Thank you very much.

Anna
 
Rajat Gupta
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess <body-content> is a required while specifying the <taglib> in DD. If you don't have it defined, its an error. Hence, the default value doesn't exist. Please correct me if I am wrong.

Regards,
Rajat Gupta
 
Sivasundaram Umapathy
Ranch Hand
Posts: 360
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP was the default value for <body-content> in JSP 1.2 spec. But in JSP 2.0 spec, this was changed and there isn't a default value any more.
 
Anbu Rajendran
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The body content of a simple tag is a JspFragment.
A JspFragment cannot contain scriptlets. So a
simple tag cannot have scriptlets in its tag.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic