• Post Reply Bookmark Topic Watch Topic
  • New Topic

TLD and uri issue  RSS feed

 
Hendra Kurniawan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to have two different TLD (whether they're placed in same directory or not) that have same uri name? something like this:

one.tld


two.tld


I know normally this is not doable. But is there any workaround?
 
Shankar Tanikella
Ranch Hand
Posts: 329
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can very well do that with differnt prefix
for example,
<%@ taglib uri="/WEB-INF/mytld.tld" prefix="tld1"%>
<%@ taglib uri="/WEB-INF/mytld.tld" prefix="tld2"%>
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66208
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, you cannot. The URI is what identifies the TLD, If there are two with the same name, they cannot be properly identified.

Why do you need to do this?

Giving them different prefixes will not help in any way at all.
 
Shankar Tanikella
Ranch Hand
Posts: 329
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for correcting me, i got the context wrong. above sample mentioned is for using different definitions in same JSP.
Anyways you cannot have 2 tlds as already mentioned..
 
Hendra Kurniawan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, bottom line what I want is not doable. No workaround available also? thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66208
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course not. It's like asking if you can have two variables with the same name in the same scope. Why do you need to do something like this?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!