• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Doubt in body-content value

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Is JSP a valid value for <body-content> sub-element of tag element in
tag library descriptor.

I have read somewhere that if you want to make your tag accept JSP as the value for the <body-content>, then you should not make an entry for the <body-content> sub-element under tag element. And the tag handler assumes it as JSP.

Even i have tried to use JSP as the value for the <body-content>, but the
container is showing me an error 'it is not a valid value'. But in HFSJ, no
information about this problem.

Please give me some info about this, if you know?

With Regards
Vinoth Selvaraj
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<body-content> in custom tags can have one of the three values

empty: Specifies that the body of the tag must be empty

JSP: Specifies that the body of the tag can accept any normal JSP code

tagdependent : Specifies that the content is not to be interpreted by the JSP engine and is tag dependent

The default is JSP

SimpleTag's body must not contain scripts-no declarations,expressions, or scripts.So it is invalid for a SimpleTag's tag library descriptor to specify its <body-content> as JSP.
 
Vinoth Selvaraj
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what about the value scriptless?
 
Kiaama Liames
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<body-content> in simple tags can have one of the three values:

empty: Specifies that the body of the tag must be empty

tagdependent : Specifies that the content is not to be interpreted by the JSP engine and is tag dependent

scriptless: SimpleTags cannot process script elements (declarations,expressions,scripts) inside body content hence scriptless , however it can contain template text,EL expression, and JSP action elements

If you want to process a SimpleTag's body , you need to set its <body-content> to tagdependent or scriptless . The specification does not define a default value for a simple tag handlers it depends on the implementation
 
Let nothing stop you! Not even this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic