hi, i am new to taglibs. i am a bit confused as what configs i have to do to make my taglib work. i've written the tag support class and put it under "Web-inf/classes...". i've put the jsp page under "webapps". and the taglib descriptor (taglib.tld) in the "Meta-inf" folder. i am not sure what should be the taglib uri, if my context path is "/test..". for eg:- the jsp page is accessed as, http://localhost:800/test/TestTaglibs.jsp
and i've given the taglib uri as <%@ taglib uri="http://localhost:800/test/taglib.tld" prefix="test" %>
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind.<br />- Dr. Seuss
Madhav Lakkapragada
Ranch Hand
Joined: Jun 03, 2000
Posts: 5040
posted
0
.... jsp page under "webapps". and the taglib descriptor (taglib.tld) in the "Meta-inf" folder. i am not sure what should be the taglib uri, if my context path is "/test..". if your context is "/test" why is your jsp in the "webapps" folder? could you give us some more of your background with tomcat. regds. - satya
Originally posted by Madhav Lakkapragada: [b].... jsp page under "webapps". and the taglib descriptor (taglib.tld) in the "Meta-inf" folder. i am not sure what should be the taglib uri, if my context path is "/test..". if your context is "/test" why is your jsp in the "webapps" folder? could you give us some more of your background with tomcat. regds. - satya[/B]
hi, i am sorry. my context path is indeed "/test" and my jsp page resides in this folder only. sure, i have been working quite some time with tomcat. raghav.
Cameron Park
Ranch Hand
Joined: Apr 06, 2001
Posts: 371
posted
0
I don't know if it's correct to place taglib.tld in /test/Meta-inf and its uri "http://localhost:800/test/taglib.tld". Try put taglib.tld out of test/Meta-inf and directly under /test. I know it should work if you specify a uri for the taglib.tld in the web.xml, and then use that uri in taglib directive.
Raghav Sam
Ranch Hand
Joined: Apr 12, 2001
Posts: 412
posted
0
Originally posted by Cameron Park: I don't know if it's correct to place taglib.tld in /test/Meta-inf and its uri "http://localhost:800/test/taglib.tld". Try put taglib.tld out of test/Meta-inf and directly under /test. I know it should work if you specify a uri for the taglib.tld in the web.xml, and then use that uri in taglib directive.
it didnt work! can somebody tell what shud the taglib uri be? can u give an example.
Madhav Lakkapragada
Ranch Hand
Joined: Jun 03, 2000
Posts: 5040
posted
0
Assuming your taglib.tld file can be in the WEB-INF folder, in your JSP you will do this:
I haven't tested this (I had my tld's in a jar file), but I am fairly confident about this. Please let us know if it works (I will try to validate it and re-post if I am wrong). HTH. regds. - satya
Raghav Sam
Ranch Hand
Joined: Apr 12, 2001
Posts: 412
posted
0
Originally posted by Madhav Lakkapragada: [B] Assuming your taglib.tld file can be in the WEB-INF folder, in your JSP you will do this:
I haven't tested this (I had my tld's in a jar file), but I am fairly confident about this. Please let us know if it works (I will try to validate it and re-post if I am wrong). HTH. regds. - satya[/B]
hi satya, no. it didnt work. am i supposed to configure my web.xml ? i am intrigued by tomcat's error:
how does it check the Meta-inf folder automatically when i have not set it anywhere? raghav.
Madhav Lakkapragada
Ranch Hand
Joined: Jun 03, 2000
Posts: 5040
posted
0
Raghav: Sorry. I will stop second guessing, will do an example and let you know at the earliest, if no one else has any input... regds. - satya