<body content> attribute

hi,the attribute <body content> should be empty|scriptless|tagdependentbut i seen sometimes it is given as "jsp". what does it mean . actually it should give some error . but its working fine.
[219 byte] By [bobza] at [2007-10-2 13:00:29]
# 1

If the body-content attribute is jsp, it means that the body content can be any valid jsp code and that appropriate substitutions will be made before the content is passed to the tag handler. If the attribute specifies jsp and there is no actual body content, that wouldn't cause a problem if the tag handler isn't expecting any body content.

If the body-content attribute is tagdependent, any body content will be passed to the tag handler "as is" (i.e. no substitutions). Again, if the attribute specifies tagdependent and there is no actual body content, that wouldn't cause a problem if the tag handler isn't expecting any body content.

If the body-content attribute is empty and there is actual body content, then you should see an error.

Gita_Weinera at 2007-7-13 10:20:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

There are two different circumstances for using the tag <body-content>

- In a JSP2.0 tag file (extends SimpleTag)

- In a tld file for a "classic" tag

JSP is NOT a valid value for use in tagfiles / SimpleTag

It IS a valid value for classic tag descriptors (tld files)

So you will see it in tag libraries originally written under the JSP1.2 or older specifications, when the value "scriptless" was not available.

Obviously they kept the value for backwards compatibility.

If you are writing your JSP pages halfway decently, you shouldn't be using scriptlets anyway, so a "scriptless" body-content should be equivalent to JSP. It just enforces the fact.

Cheers,

evnafets

evnafetsa at 2007-7-13 10:20:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...