Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on tag files

 
rohit sen
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All

If the container looks for tag files at some standard locations (Pg 499 HFSJ), why do we need to again specify the location in 'tagdir' attribute of 'taglib' directive? The only reason I can think of is a name conflict. Is there some other reason for this redundancy?


Thanks!
 
Keith Flo
Ranch Hand
Posts: 128
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You've got to indicate in some way which tag file(s) you want to use in your page.

For tag files there may not be a tld so the container need to know which tag file you want to use ... you may have many tag files in the same directory so you've got to say which one you want ... hence the tagdir attribute.

 
rohit sen
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When the location of tag files is already standardized i.e WEB-INF/tags or WEB-INF/tags/moreTags etc, whats the point in again giving the same path in tag dir?
Also even If I give tagdir='WEB_INF/someDir', it wont look for tags in that folder right? So I don't see the use of giving a tagdir at all. But why is it mandatory?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65340
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What it comes down to is: the Spec says so. And if you don't do it, it won't work.

Why the framers of the Spec felt it was necessary is just a matter of guesswork.
 
rohit sen
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok...Thank You!

I just wanted to know if I was missing something or I did not understand properly because there is usually a very good reason whenever i see a redundancy other that "specs say so".
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65340
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've wondered myself as it does seem unnecessary and redundant. Perhaps at one time in the formulation of the Spec, more than one location was proposed and this is a remnant of an incomplete scaling-back decision.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65340
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By the way, the tagdir directive is unnecessary when the tag files are declared in a TLD.
 
rohit sen
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:By the way, the tagdir directive is unnecessary when the tag files are declared in a TLD.


Thank You..didn't know that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic