• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is Scripting allowed in Simple and Custom Tag Body?

 
stephen dimitrov
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm confused as to whether scripting is allowed in the body of a Simple and/or Custom tag. According to Head First Servlets, a simple tag can have a <body-content> of 'JSP', meaning scripting is allowed in the body (see page 472). However, on page 512 it says that a JspFragment CAN NOT have any scripting. This is confusing since getJspBody() returns a JspFragment representing the tag body. So, my questions are:

1. Can Simple and Classic tags have scripting in the body?

2. How can a JspFragment represent a body with scripting if it can't have any scripting?

Thanks
 
muhd yousuf
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I know, only tag files body can't have scripting. Customs and Simple tags body can have scripting.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic