• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is "JSP" a valid value for body-content element

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic