Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Why SimpleTag handler's not accepts<body-content>JSP</body-content>?  RSS feed

 
Chinmaya Chowdary
Ranch Hand
Posts: 437
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, If we use SimpleTag handler classes, in the tld file if we declare <body-content>JSP</body-content> and if we call the corresponding tag in the jsp, we will get an JspException.(Because by default the JspFragment object will not accept scriptlets in the body of the tag, and can accept EL expressions, jsp standard actions, and custom actions.) But incase of Classic Tags, it will accept i.e. we can write the body with scriptlets, EL, standard and custom actions. My question is why the simple tags doesn't accept(scriptlets in the body), while classic tags accepts? Why that behavior is removed in simple tags? Can you please tell me in detail? Thankyou.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66198
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because scriptlets should no longer be used. They are compatible with old-fashioned classic handlers for backwards compatibility, but should not be used with the new JSP 2.0 handlers.
 
Chinmaya Chowdary
Ranch Hand
Posts: 437
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankyou Sir.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!