| Author |
mention tld file in jsp
|
pramod talekar
Ranch Hand
Joined: Apr 26, 2010
Posts: 316
|
|
Hello,
I have created a tld file and placed it in WEB-INF/tag folder.
How to mention it in the jsp file ?
I'm writing , but it shows "can not find tag library descriptor for ...." error.
Please advise.
|
Thanks,
Pramod
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56151
|
|
|
Don't use the file path for the URI, use the real URI for the TLD.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
pramod talekar
Ranch Hand
Joined: Apr 26, 2010
Posts: 316
|
|
Hi Bear,
Below is my .tld file code :-
What will be the uri from the below code which I'll mention in my jsp :-
The file is stored as egdpagination.tld
The below statement in my jsp file uses this tag :-
|
 |
pramod talekar
Ranch Hand
Joined: Apr 26, 2010
Posts: 316
|
|
Hey Bear,
I got the solution for this problem.
I kept it as <% ...." /WEB-INF/tags/egdpagination.tld" ....%> , I didn't have any <uri> tag in my tld file and I also mentioned the following code in my web.xml file :-
|
 |
Stefan Evans
Bartender
Joined: Jul 06, 2005
Posts: 1002
|
|
Well thats one way to do it.
But not the best IMO.
The better way is to indicate the URI in the tld with the uri tag: <uri>my.tag.egdpagination</uri>
You can then get rid of the entry in your web.xml file.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56151
|
|
Stefan Evans wrote:Well thats one way to do it.
But not the best IMO.
I'll go further and say that it's a very poor and fragile way to do it.
Assign a real URI to the TLD as Stefan outlined.
|
 |
pramod talekar
Ranch Hand
Joined: Apr 26, 2010
Posts: 316
|
|
Thanks Stefan and Bear for your advice.
Regards,
Pramod
|
 |
 |
|
|
subject: mention tld file in jsp
|
|
|