• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Qn 17 Page557

 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 .
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sometimes you feel like a nut. Sometimes you feel like a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic