• Post Reply Bookmark Topic Watch Topic
  • New Topic

taglib URI question

 
Arul Jose
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

when we use the taglib given above, we are pointing our uri to http://java.sun.com, but it actually refers to the files in the local library(the jars which we have put inside the WEB-INF/lib - jstl.jar and standard.jar). wbat is the purpose of this uri?

without this uri, i could not run the corresponding tags.

jose
[ July 12, 2005: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Despite the fact that a URI looks like a URL, it is not referencing anything. It is just a string that identifies something. It could just have easily been "jashgjhgfsagdksja" but the inventors of URIs determined that a string patterned after URLs would be easier to manage.
 
Arul Jose
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what i could see from my experimentation is that some file is taking this input "http://java.sun.com/jsp/jstl/core" and leading the jsp to refer the file c.tld.

is my guess right?

if i am right please tell me what is that 'some file'
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
some file is taking this input "http://java.sun.com/jsp/jstl/core" and leading the jsp to refer the file c.tld.


That "some file" is c.tld itself.

If you look in the tld file, you will see the URI declaration. Each TLD should have a unique URI (that's the U or URI) to identify it.

That's one of the reasons a URL-styled URI was chosen: since domains are uniquely "owned", URIs that you define should never collide with URIs that I define, since we will each use URIs based upon domains the we respectively own. For example, I would never expect to see any else use the domains bibeault.org or 3chiles.com in a URI as they are domains that I own.

Make sense?
 
Arul Jose
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry i could not get exactly what you are talking about.

i have one more question how does the container know that it should take c.tld? c.tld is in some folder inside the jstl.jar. how does the container find it?
 
Arul Jose
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i guess the 'that file' must be an xml file like web.xml.
 
Marco Vanoli
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also me have the same dubt. I don' understand why it' s possible to put different references and i ask myself too if the application vistit the site show in the taglib declaration.
[ July 14, 2005: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marco, please do not post your question in more than one thread. It wastes people's time when multiple redundant conversations take place.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i guess the 'that file' must be an xml file like web.xml.


Show some initiative and open up c.tld for yourself. You will readily see its format.
 
Marco Vanoli
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
Marco, please do not post your question in more than one thread. It wastes people's time when multiple redundant conversations take place.



I know but when i posted i haven' s seen this post. Just see it i post here.

However thanks for reply.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!