This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Custom Tag Doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Custom Tag Doubt" Watch "Custom Tag Doubt" New topic

Custom Tag Doubt

Ankit Nagpal
Ranch Hand

Joined: Sep 09, 2008
Posts: 47

Hi Everyone,

While doing the mocks, I found the following question:

Assume that st:simple is a Simple Tag. In what way can scriptlet code be used in this tag?

The correct answer for this is: Scriptlet code is NOT legal in the body of this tag.

Is it true? The question does not talk about body-content of the tag.
Ranil Liyana Arachchige
Ranch Hand

Joined: Sep 20, 2008
Posts: 71


In the question it asks "in what way you can use scriptlet code IN the tag" , in other words it asks what you can write between the opening and closing of that particular tag.[ opening tag ---> <tag:simple> ] [ closing tag ---> </tag:simple>]

Obviously then you have to worry about the body content.

Hope this clarifies your doughs.


SCJP 1.4 (80%) , SCWCD5.0 (91%) , SCEA / OCMEA
Ankit Nagpal
Ranch Hand

Joined: Sep 09, 2008
Posts: 47


Thanks for your quick response.

However, I actually meant that the question does not talk of the <body-content> tag of the TLD.

I thought that JSP is a valid value for this tag in case of Simple Tags, but after searching I found out that JSP is not a valid value in this type of tag. Hence scripting is not allowed.
I agree. Here's the link:
subject: Custom Tag Doubt
It's not a secret anymore!