Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Missing a bit in FAQ on EL functions

 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've read the EL functions FAQ,
http://faq.javaranch.com/java/DefineELFunctions
and I still don't fully grok it.

Specifically, there seems to be no binding between the TLD and the taglib reference in the JSP page

What, exactly, is "whatever"?
<%@ taglib uri="http://bibeault.org/tld/whatever" prefix="whatever" %>

Is this the name of the TLD file? Or some other keyword within the TLD?
or something else that I'm not seeing?

thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65545
110
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"whatever" is pretty much just that: whatever you want it to be.

The key is that URI, which in this example is http://bibeault.org/tld/whatever matches the URI that is declared within the TLD (using the <uri> element).

Obviously, no but me should use bibeault.org, but rather a uniquely owned domain so that the URI is universally unique.

This is how the container matches up the TLD -- it looks for a TLD file with that URI in the WEB-INF tree and within the META-INF folder of loaded jar files.

The prefix can be whatever you want to use on the page.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65545
110
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I added a clarification to the FAQ.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:The key is that URI, which in this example is http://bibeault.org/tld/whatever matches the URI that is declared within the TLD (using the <uri> element).


There is no "URI" element in the sample TLD.

If I need to match it, an example would be goold
 
Not so fast naughty spawn! I want you to know about
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!