• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TLD uri and JSP uri

 
Rajesh Vijaya
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In TLD

<uri>SimpleTags</uri>

in my JSP

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


with above the settings if run my jsp its working perfectly fien...

Inorder for the JSP to work doesn't the uri's in TLD and JSP match....

In this scenario vat is happening and how is the mapping taking place!!
[ December 06, 2005: Message edited by: Rajesh Vijaya ]
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't see any relation between your SimpleTags libray and the JSTL.
Is SimpleTags a library you've made ? If so, are you actually using your own tags in the JSP file ? If you're not using your tags, I don't think there is any reason errors to occur.
 
rehans oberoi
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi staou
do u want to say ,
as it is using core library of jstl
there is no error

and error will come
if it is making own custom tag
does it make some sense
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. Sorry for being so unclear.
I was just wondering what TLD was Rajesh talking about

-->Rajesh
Did you set the uri in c.tld to SimpleTags ? Or is it a TLD you've made ?
 
Rajesh Vijaya
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Satou ,

I'm not using any cutom tags i'm just using URL Relation Tag

c:import in my JSP....

i have Firsttag.tld file in which <uri>simpleTags</uri>( this uri could be anything)

when i delete this file....my jsp does not work...

i just want to know for using JSTL, vat significance does the uri attribute of taglib directive has....and how does the container does the mapping....

vat is the value that we have to give to uri in .tld file...

..(i'm sorry i was not clear in my question earlier)..

Thanks
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
c:import needs a URL, not a URI. The URL you set in c:import has to point to an existing file.

For example :


It has nothing to do with the URI you have set in your tag file.

I'm not sure what you want to do by importing the tld file though.
I may be misunderstanding your problem. Sorry.
If you could post a part of your JSP, this may help.
 
Rajesh Vijaya
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Satau,

here is my jsp file...


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

<html> <body>

Going out side the server

<c:import url ="http://www.hotmail.com" />

Hotmail Loaded

</body></html>


Its working fien now...


I'm sorry about the confusion that i have created...i think i did not restart/misplaced some file...in my TOMCAT during invoking the jsp...

so vat i understand now is....in order to invoke a jsp contaning JSTL .....taglib directive must have a uri =" "...

and one does not need any tld files...since we have JSTL jar file deployed in web-inf/lib....

is that correct...
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>taglib directive must have a uri =" "
Well, you may also use the tagdir attribute instead,
but most of the time, I think you'll use uri indeed.

>nd one does not need any tld files...since we have JSTL jar file deployed in web-inf/lib....
Yes, if the TLD are in the JAR file, under META-INF

For more information about this, please refer to "JSP.7.3.4 Implicit Map Entries for TLD" in the JSP specification.
 
Rajesh Vijaya
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks satau.....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic