• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Qn 17 Page557

 
bernard savary
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IN HF the errata for qn mentions
Both tags are declared to be non-empty in the TLD.
should read:
Both tags are declared to be non-empty and non-tag dependent in the TLD.
But even after this the answer seems to be wrong , because option D is also valid :

anwser D is .
<my:simpleTag>
<my:complexTag>
<% i++; %>
</my:complexTag>
</my:simpleTag>

I tried it with body-content as scriptless for simple and JSP for classic and the above works fine . I think simple tag will complain only if there is a direct body with scripting , in this case it is enclosed within a classic which allows scritping . Has anybody tried it before ?
Please let me know .
 
John Pearson
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried this the same way you did, setting body-content to scriptless for the simple tag, and JSP for the classic. Except in my case, as soon as I put any scripting element into the body of the classic tag, I get an HTTP 500 error, and an exception with the message "Scripting elements are disallowed here." Pretty weird!

I looked through the JSP spec, but couldn't find any description of the specific case of how to process a simple tag enclosing a classic tag which has scripting elements in its body. Is it possible that this behavior is container dependent? It doesn't seem it should be, but I can't think of how else we could get opposite results. I'm using Tomcat 6.0. What are you using?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic