aspose file tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes tags Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "tags" Watch "tags" New topic
Author

tags

Sophie Angela
Ranch Hand

Joined: Jul 17, 2006
Posts: 46
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

Joined: Sep 26, 2006
Posts: 8795

Gunjai,

The body-element tag is not optional. It is a must that you specify it.


SCJP 1.4, SCWCD 1.4 - Hints for you, SCBCD Hints - Demnachst, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
Arunava Bhattacharya
Greenhorn

Joined: Dec 26, 2006
Posts: 15
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.


Thanks....<br />babun
Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572
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

Joined: Dec 26, 2006
Posts: 15
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

Joined: Feb 05, 2003
Posts: 4725

"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.


A good workman is known by his tools.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: tags
 
Similar Threads
Scripting code in tag
Tag files and JSP
simple tag and classic tag body-content
Default value of body-content
body-content value??