File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Doubts in Writing TLD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Doubts in Writing TLD" Watch "Doubts in Writing TLD" New topic

Doubts in Writing TLD

Micheal John
Ranch Hand

Joined: Nov 01, 2006
Posts: 344
I ahve a doubt in the .tld xml file.
If in .tld xml file, I want to write two can we write it..?

For Example:
I am having class with two static methods(meth1() and meth2()), which will be called by EL in the JSP. Can .tld xml will have more than one uri?
I have to configure this two methods in the .tld file:
Whether below .tld file is correct..?

Micheal John
SCJP 1.4 (86%), SCWCD 1.4 (86%), SCBCD 1.3 (85%), SCDJWS (Just Started...) - Satisfaction Lies in Our EFFORT, Not in the ATTAINMENT
Niranjan Deshpande
Ranch Hand

Joined: Oct 16, 2005
Posts: 1277
just remove the two uri, you should have one <uri> per file.
the two function tags are fine.
if you want to code the funtion in a sepearte tld, write a sepearate tld
with a seperate <uri> and use tow taglib entries in your jsp and the make
a seperate call to your two fuctions


SCJP 1.4 - 95% [ My Story ] - SCWCD 1.4 - 91% [ My Story ]
Performance is a compulsion, not a option, if my existence is to be justified.
Stella Kim

Joined: Jan 18, 2007
Posts: 25
So, the two functions have same uri..
Those functions also can have same prefix ?
(I think they can, as long as they have different function name in TLD.)
so, in JSP, we can use only ONE taglib directive to call those functions ?
The two functions must have two different prefix, and must use two separate taglib directive ?.
[ January 21, 2007: Message edited by: Stella Kim ]

Kim<br />SCJP 1.4 (98%)<br />SCWCD (92%)
I agree. Here's the link:
subject: Doubts in Writing TLD
It's not a secret anymore!