Two Laptop Bag
The moose likes Struts and the fly likes Why are tag files used Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Why are tag files used" Watch "Why are tag files used" New topic

Why are tag files used

James Winfrey
Ranch Hand

Joined: Jan 04, 2009
Posts: 62
Hi Guys

Why do we use tag files instead of jsp:include and c:import?

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63874

There could be many reasons, but for me it boils down to one word: parameterization.

[Asking smart questions] [About Bear] [Books by Bear]
David Newton

Joined: Sep 29, 2008
Posts: 12617

They're kind of different things, too: tags are generally intended to encapsulate behavior, can do things to their bodies, etc. Includes are primarily focused on presentation only, don't "do" anything, and so on.
I agree. Here's the link:
subject: Why are tag files used
It's not a secret anymore!