Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Scripting inside tag body

 
Bharat Roy
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
....come on guys...anyone.
 
Nitish Bahadur
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simple Tags do not allow JSP and scriptlets.
 
Bharat Roy
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic