Originally posted by Eshu San:
Hi
In a SimpleTagSupport class the getJspBody returns JspFragment object.JspFragment is an object that wraps the body of the tag that invoked it and sent to the setJspBody() method during the invocation of the tag.so when getJspBody is called ,JspFragment object which wraps the body of the tag is returned.
In the book HFS it's mentioned that JspFragment must not contain "SCRIPTING ELEMENTS".My doubt is that there is a value called "JSP" for the
body-content element in the tld.As we know JSP means it can have scripting also.Does this mean that "JSP" is not a valid value for the body-content element whose parent element <tag>'s implementation class should not extend SimpleTagSupport coz the concept of JspFragment is applicable only to SimpleTags and not classic tags.
can anyone pls explain me
Hi,
In JSP 2.0, we can have 2 types of custom tags
1. Classic Tags (Tags implementing Tag, IterationTag or BodyTag interface directly or indirectly)
2. Simple Tags (Tags implementing SimpleTag interface or Tags based on Tag Files)
In former's case <body-content> can have the following values - empty|tagdependent|JSP|Scriptless
But
for the later, valid values can be - empty|tagdependent|scriptless
("JSP" is not allowed since the tag's body is used to create JspFragment object which as you mentioned cannot have scripting elements)
I hope it answers your question.
Abhi.
[ November 19, 2004: Message edited by: Abhishek Mahanty ]