• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why use tags instead of scriptlets?  RSS feed

 
Dan Silva
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been going through the HF book, and they seem pretty upset about scriptlets being used in a JSP. What are the reasons that this is considered a big no-no? It seems like I can get more functionality out of scriptlets than I can out of beans/tags.

Thanks,
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's the problem. By putting too much functionality in a JSP, you create a mess and violate the precepts of MVC. JSPs are intended to be templates for the view, not computational units. By limiting JSPs to what the JSTL and El provide, they self-regulate and ensure that stuff doesn't get put into a JSP that has no business being there.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!