File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Scripting in tag bodies? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "Scripting in tag bodies?" Watch "Scripting in tag bodies?" New topic
Author

Scripting in tag bodies?

Ryan Day
Ranch Hand

Joined: Apr 03, 2006
Posts: 87
Can someone verify this for me?

Q: Can a tag body contain scripting?

A:
If it refers to a tag file - yes
If it refers to a simple or classic tag handler - no


SCJP, SCWCD
Ryan Day
Ranch Hand

Joined: Apr 03, 2006
Posts: 87
To answer my own question from the following FAQ:

SCWCDFAQ

Contain scripting?

Tag files - no
Classic tags - yes
Simple tags - no
Hendy Setyo Mulyo
Ranch Hand

Joined: Dec 01, 2004
Posts: 219

Originally posted by Ryan Day:
To answer my own question from the following FAQ:

SCWCDFAQ

Contain scripting?

Tag files - no
Classic tags - yes
Simple tags - no


Hi Ryan,

Thanks for the explanation, but what is the difference between tagdependent and scriptless?


Hendy Setyo Mulyo
SCJP 1.4 (95%), SCWCD 1.4 (94%)
Ryan Day
Ranch Hand

Joined: Apr 03, 2006
Posts: 87
>>but what is the difference between tagdependent and scriptless?

Here's the explanation from the JSP 2.0 spec, page 3-21:


tagdependent
The body of the tag is interpreted by the tag
implementation itself, and is most likely
in a different "language", e.g embedded SQL
statements.

JSP
The body of the tag contains nested JSP
syntax.

empty
The body must be empty

scriptless
The body accepts only template text, EL
Expressions, and JSP action elements. No
scripting elements are allowed.
Hendy Setyo Mulyo
Ranch Hand

Joined: Dec 01, 2004
Posts: 219

Thanks Ryan.
Strange, this scriptless body-content is not explained in Hanuman Desmukh's 2nd Edition SCWCD Exam Kit book. Perhaps the book need to be updated? So according to the spec, can we conclude as tagdependent is a subset of scriptless?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Scripting in tag bodies?
 
Similar Threads
HFSJ - Page 557 - Question 17
Chapter - 7 Question 13
forEach tag
How would you define "action"?
difference between tag and tld