| Author |
standared tag uri : need clarification
|
Sreeraj G Harilal
Ranch Hand
Joined: Apr 19, 2006
Posts: 310
|
|
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?
|
SCJP 5.0<br />SCWCD 1.4<br />Preparing for <b>SCEA</b>.<br /><b>"I prefer an interesting vice to a virtue that bores."</b>
|
 |
Tha�s Manfrim Firmino
Ranch Hand
Joined: Apr 12, 2004
Posts: 48
|
|
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.
|
Tha�s M. K. M. Firmino
|
 |
Sreeraj G Harilal
Ranch Hand
Joined: Apr 19, 2006
Posts: 310
|
|
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
Joined: Nov 24, 2005
Posts: 14672
|
|
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.
|
[My Blog]
All roads lead to JavaRanch
|
 |
Sreeraj G Harilal
Ranch Hand
Joined: Apr 19, 2006
Posts: 310
|
|
Thanks Satou kurinosuke for reply
|
 |
 |
|
|
subject: standared tag uri : need clarification
|
|
|