File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

standared tag uri : need clarification

 
Sreeraj G Harilal
Ranch Hand
Posts: 310
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To use a standared tag we need to specify the uri in tablib directive.

My doubt is :
If we use any of this uri standared tags work fine.

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core_rt" %>


How is it possible? Is they using 2 different tld file for the same tags?
 
Tha�s Manfrim Firmino
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure if I got your question. You mean, if you use any of the two lines the code work? Well, if it is the question, the uri is a name that you choose and assign inside the tld file, and then you use this uri inside the jsp. If the uri is wrong, you won't have problems declaring it, but when you attempt to use you will do have problems since it won't be able to find the tags. I mean:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core_rt" %>
won't generate error, but if you type:
<c ut.../>, then you will have an error.
 
Sreeraj G Harilal
Ranch Hand
Posts: 310
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, Actually its not standard tags its custom tags.

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core_rt" %>


If we use any of this taglib directive JSTL works fine.

Is JSTL using 2 different tld files for the same tag library?
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that core_rt is an old uri used in JSTL 1.0.
It still works, because the uri is defined somewhere in standard.jar (c-1_0-rt.tld) Anyway, you should not use it anymore.
 
Sreeraj G Harilal
Ranch Hand
Posts: 310
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Satou kurinosuke for reply
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic