*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Scripting inside tag body 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 "Scripting inside tag body" Watch "Scripting inside tag body" New topic
Author

Scripting inside tag body

Bharat Roy
Ranch Hand

Joined: Jul 01, 2004
Posts: 156
Ref. HFS&JSP Page 487 Q.5 and Page 567 Q.17

Here are my doubts:

(1) Is scripting not allowed inside Simple tags BUT allowed inside Classic Tags.

(2) Pg. 567 Q.5 option (B) -- why it's invalid??? If i declare body-content to be JSP, it should be valid.

I guess it's the tag file whose body-content is scriptless (by default).

Really confused Somebody clear my doubt please.

Thanks.
Bharat Roy
Ranch Hand

Joined: Jul 01, 2004
Posts: 156
....come on guys...anyone.
Nitish Bahadur
Ranch Hand

Joined: Aug 25, 2003
Posts: 118
Simple Tags do not allow JSP and scriptlets.
Bharat Roy
Ranch Hand

Joined: Jul 01, 2004
Posts: 156
Originally posted by Nitish Bahadur:
Simple Tags do not allow JSP and scriptlets.

Thanks for the response, Nitish. What abt Complex tags, do they support scripting.
Nitish Bahadur
Ranch Hand

Joined: Aug 25, 2003
Posts: 118
As far as I know, there is nothing called Complex tags. I think you meant Classic tags. Yes you can have JSP as <body-content>.
Bharat Roy
Ranch Hand

Joined: Jul 01, 2004
Posts: 156
Originally posted by Nitish Bahadur:
As far as I know, there is nothing called Complex tags. I think you meant Classic tags. Yes you can have JSP as <body-content>.

My mistake, I was referring to the HFS books' example and got confused. Thanks for the reply.
Durgaprasad Guduguntla
Ranch Hand

Joined: Oct 20, 2003
Posts: 99
Simple tag handlers can only be used for tags that do not use scripting elements in attribute values or the tag body. Classic tag handlers must be used if scripting elements are required.

The default body-content value is JSP by which the scriplets are enabled in classic tags.

Thanks,

Durga


Thanks,<br />Durgaprasad<br />SCJP1.4, SCWCD1.4, SCBCD1.3,<br />SCEA
 
 
subject: Scripting inside tag body
 
Similar Threads
Is Scripting allowed in Simple and Custom Tag Body?
Scripting in body of Custom Tags
Scripting in Simple and Custom Tag Body
scripting in tag bodies
body-content