• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

body-content confuse.

 
Anna Wang
Ranch Hand
Posts: 30
  • 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
  • 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
  • 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
  • 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.
 
Never trust an airline that limits their passengers to one carry on iguana. Put this tiny ad in your shoe:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic