This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

why JSF taglib pointing to Internet Sun site?  RSS feed

 
yamini nadella
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

does it mean .tld file is located at this internet URI site? But when I tried to goto that URL in internet explorer then it is going to sun site and giving message is page not found.

Even when I tried to use MyFaces implementation also it has similar thing to apache site.
According to my knowledge in uri we have to put location of .TLD file or URI which will be mapped to .TLD file in web.xml.

But here it looks strange?

Thanks in advance
Yamini.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The TLD files are typically located in a JAR file in your WEB-INF/lib folder. That is how JSP2.0 locates those files now, unlike the old version which required you to specify a location to them in your web.xml file.

A lot of times the TLD can also be located via the URI on the web, but that isn't always the case.
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
adding to what already been said, in the following statement


the URI attribute most probably be equal to the unique <uri> tag value specified in your taglib tld file :


More Details
 
yamini nadella
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still I did not get clarification. So If jar file has many .TLD files then how this URI mapped to particular .TLD file. Even in myfaces implementation also they have below URI. can I change this URI value to some thing else?

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x"%>
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by yamini nadella:
Still I did not get clarification. So If jar file has many .TLD files then how this URI mapped to particular .TLD file. Even in myfaces implementation also they have below URI. can I change this URI value to some thing else?

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x"%>


No you can't change it to something else. The TLD file itself has this URI in it. So when the page is parsed, the JAR files are searched for the TLD and it verifies it has the correct TLD by matching URI's.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!