This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What's the difference between jspf and tags  RSS feed

 
Rob Wehrstein
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know jspf is a jsp fragment, but can't a tag also serve as a jsp fragment?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65825
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are very different mechanisms. A static include happens at translation time and has no means to pass data to it in a controlled fashion. The fragment is simply included in the JSP source as if it had been typed into it.

A tag on the other hand is evaluated at run time and has a defined interface for passing data to the tag. It is a much more modular approach to reusable "fragments".
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!