• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

taglib directive

 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Does this require internet connection?
 
Andy Smith
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope Pradeep..
as far as i know this uri is can be anything ,,,,,
It doesn't needs the internet connection... it is just mapped to the actual url in the TLD file...
U can say it is a nick name fro the actual thing.. u just refer it by this name.. one of the benefit is that if the path of the taglib changes later u just need to modify the mapping in the TLD file, instead of modifying each and every JSP File...
 
Anselm Paulinus
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andy:
I do not think you understand the question posed by Pradeep Bhat.
If I am not wrong this has to do with JSTL and he wants to know if that requires internet connection since the tag libraries are supposedly already built for you by Sun.
I too have the same question only that I suspended learning JSTL for now, but I think it is going to require internet connections. I hope those who are already using JSTL or JSP 2.0 will be able to answer this question.
 
Krishna Srinivasan
Ranch Hand
Posts: 1876
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But that URI should be mapped in web.xml.
under <tag-lib> element we have two sub elemnets
<uri> </uri> //it may be any thing
<location> </location> //it should be mapped correctly
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Krishna Srinivasan:
But that URI should be mapped in web.xml.
under <tag-lib> element we have two sub elemnets
<uri> </uri> //it may be any thing
<location> </location> //it should be mapped correctly

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

Does this require internet connection?
=====================================================================
NO internet connection required.
Download the binary distribution of the RI from Here
After unzipping,(read the README file)
Trying the sample application: Copy the standards-doc.war and standreds-examples.war to the webapps directory of Tomcat.Make sure you set the CATALINA_HOME environment variable to point to where you installed Tomcat.
Type:
http://localhost:8080/standard-examples/index.html
You should be able to access the standard-examples web application .
[ December 06, 2003: Message edited by: Amer Khan ]
 
cyril vidal
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pradeep,
Indeed, you never need a internet connection to find a taglib from which URI is an absolut URL.
But you have and NEED to map this absolut URI to <taglib-location> so you were wrong in saying in a precedent thread that we do not to do this.
Indeed, that's the only type of URI you have to map, because if it's not the case, JSP container will throw an translation time error. You don't have to do an explicit mapping only for root-relative URI and non root-relative URI.
HTH,
Regards,
Cyril.
[ December 05, 2003: Message edited by: cyril vidal ]
[ December 05, 2003: Message edited by: cyril vidal ]
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But you have and NEED to map this absolut URI to <taglib-location> so you were wrong in saying in a precedent thread that we do not to do this.

There is no need for mapping to be done.
 
cyril vidal
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, you're right and I'm right.
If we talk in general, that is if we talk about explicit mapping, I'm right. An absolute URI must always be mapped in web.xml.
In the case of JSTL, implicit mapping is done between the URI specified in the TLD jarred file and the location of the jar. That's why you don't have to write anything in web.xml.
But you may always override this default mapping.
I should have been more precise, sorry.
Regards,
Cyril.
[ December 05, 2003: Message edited by: cyril vidal ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic