• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tags

 
Sophie Angela
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if there is no <body-content> element specified for a tag in the TLD ,then what is the default value for that body content element?

Can we use tag file directives inside a JSp page?

Can JSp directives be used in a Tag file?

please post me a brief answer
[ February 07, 2007: Message edited by: Marc Peabody ]
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gunjai,

The body-element tag is not optional. It is a must that you specify it.
 
Arunava Bhattacharya
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gunjai,
<body-content> in mandatory according to the JSP2.0.It was optional according to JSP1.2:Following are the different values of it:

ClassicTag:
1)JSP
2)tagdependent
3)scriptless
4)empty

SimpleTag:
1)tagdependent
2)scriptless
3)empty

TagFile:
1)scriptless
2)tagdependent
3)empty.

Note:Now there is no concept of "default value of <body-content>" after JSP2.0 since it is mandatory now except for tagfiles...and you should avoid questions on mocks which does not show a <body-content> inside the tld.


Regarding the second quesion i would say that you CANNOT use "tag" directive inside a JSP file.It is solely meant for the use of tag files.

Hope this clears your doubt.
 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is what i found from jsp2.0 specs

Page 1-80 Table JSP.8-2


body-content (optional) Provides information on the content of the body of
this tag. Can be either empty, tagdependent, or scriptless. A
translation error will result if JSP or any other value is used.
Defaults to scriptless.
 
Arunava Bhattacharya
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ali,

The table you are mentioning in the specs is related to tag files and for not for Custom Tags.As i have already mentioned in my previous post that for tagfiles we do have a default value.

Please go through my prev post once.
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Jai", please change your display name to comply with the JavaRanch Naming Policy. Your display name needs to be a first AND last name. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic