Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Chinmaya Chowdary
Ranch Hand
Posts: 437
  • 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: 65537
108
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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankyou Sir.
 
For my next feat, I will require a volunteer from the audience! Perhaps this tiny ad?
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!