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

Custom Tag question

 
ani jadhao
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From one of mock question of java beat , I came across a custome tag ques .

....
<tag-class>com.print.PrintBodyTab</tag-class>
<body-content> tagdependent</body-content>
....

<ex:printbody><%=(3+2)%></ex:printbody>

Assuming all mapping in TLD is proper to run the tag . What will be the output of the above ?
options are
a.transalation error
b. runtime exceptin
c.response contains : "<%=(3+2)%>"
d. "5"

I guess , option c would be right fit over here as the body content is tagdependent here , so what ever would be in the body of tag , treated as plain text. :?: ?

Please correct me if am I wrong?
thanks
Ani

 
Shruthi Sam
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes...you are right...


refer the below thread...

http://www.coderanch.com/t/172875/Web-Component-Certification-SCWCD/certification/tagdependent
 
Harvinder Thakur
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes. tagdependent would imply treat the body as plain text. Hence any scripting or EL expressions would be ignored and output to the response as such
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic