• 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Tag file problem

 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can we declare a Tag that must not have a body in a Tag file

I think correct one is

<@tag body-content="empty" %>

but HFSJ says in page no 548

<@tag body-content="tagdependant" %>

what is the correct?
 
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

<@tag body-content="empty" %>


means the tag cannot have body.

<@tag body-content="tagdependant" %>


tells that the tag can have body but its body will be taken as text. If the tag body contains any EL or scriptlet it won't be evaluated and will be printed as it is
 
Ranch Hand
Posts: 10192
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then what does saying body-content = "scriptless" means?? I think this resembles more closely to saying tagdependent??? Am I right?
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Scriptless means that it should not have any scripting elements, else translation error will be thrown
 
Joe Harry
Ranch Hand
Posts: 10192
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That means with tagdependent, we can have EL, scripting elements, but they won't be evaluated and they will just be printed like the body. Am I right guys??
 
Chaminda Amarasinghe
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks all.
 
Amirr Rafique
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Jothi Shankar Kumar Sankararaj:
Then what does saying body-content = "scriptless" means?? I think this resembles more closely to saying tagdependent??? Am I right?



The body-content = "scriptless" means the body cannot have scriptlets (scriptless <%..%>, expression <%= .. %> and declaration <%! .. %>) but it can have EL and <jsp:...>.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic