Why is scripting disallowed in the body of simple and classic tag.
From I read in chapter 10, we can set the body content of simple and classic tag to JSP, empty, scriptless or tagindependant in TLD. Furthermore, tag directive can be defined to set the body content of tag file to empty, scriptless or tagindependant.
How come the correct answers to the question are A and C only?
Is the limitation written in the book or just in JSP spec?
Hi, I think because simple tags are going to handle the contents of the body as JSP Fragments since scripting is not allowed in JSPFragments it is not allowed in simple tags.But in Classic tags bodycontent object is used to handle the contents so i think JSP is allowed in classic tags.
Please don't forget to say something when somebody answered your questions A simple "thanks" will tell us that you've seen our replies. You've never replied in any of your posts.
I read the API of JSPFragement class and JSPFramenet cannot contain scriptlets and scriptlet expression. Thanks for pointing it out in the previous post.
I will verify whether or not classic tag can handle scriptlet and scriplet expressions in its body some other time.