Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

purpose of .tag files?

 
Jeyalakshmi Palaniyandi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have read about .tag files in head first servlet/jsp.
they mentioned that .tag files are just glorified includes.
is it same like <jsp:include> and <c:import>?
can any one please tell me whats the difference between the two.
and also what is the main purpose of .tag files?

thanks,
Jeyalakshmi
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64970
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tag files allow you to create custom actions (tags) using JSP markup rather than writing a tag handler in Java code. They are well-suited to tags that emit lots of template text or that need to perform JSP-like actions.

They are superior to include or imports for creating re-usable components because data can be formally passed to the tags via the attributes. With includes and imports, data passing is informal via scoped variables.
 
Jeyalakshmi Palaniyandi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot Bear Bibeault
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic