wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Custom Tag Doubt" Watch "Custom Tag Doubt" New topic
Author

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

Hi,

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.

Regards,
Ranil


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

Joined: Sep 09, 2008
Posts: 47

Hi,

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Custom Tag Doubt
 
Similar Threads
SimpleTag allows body-content as JSP?
Escape seq...
about <body-content> of tag
Help!Doubt on SimpleTagSupport
HFSJ mock Q