hi, I read the following in a website "Simple tag handlers can be used only 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." However, nothing of this sort is mentioned in the K & B book. Is the above information correct ? If not, then whats the actual difference between simple and classic tags except that simple tags are easier and simpler to use ? K &B states that classic tags used to be there in the previous version and hence supported. Any other reason such as the one stated above ?
The body of a simple Tag is processed as a JspFragment , which can only contain template text and JSP action elements. so, it must not contain scriptlets or scriptlet expressions . <body-content> for a SimpleTag cannot be JSP and defaults to "scriptless" . A translation time should occur if the body content contains scriptlets or scriptlet expressions .
a classic Tag doesnot have this restriction as its body is processed as BodyContent which is a subclass of JspWriter .