JBuilder and custom tag problems
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ian_Ohlander
Posted On:   Thursday, July 11, 2002 06:14 PM

I have a tag library with two tags: alphaDisplay.class and categoryDisplay.class. My tld, validated by JBuilder 6, is coctags.tld. Now realize that when I use those tags just in a Tomcat webapp (the usual: jsp in root folder, tags in /classes/coctags/ and tld in /WEB-INF/tlds/) then it works fine. The taglib is located and used to access the tags. Keep that in mind. It works in Tomcat alone. The tld is valid, the tags compiled and are accessed properly. My problem is that I want to use the tags in JBuilder 6. So I created a coctags.jar- the two tags and then META-INF/taglib (name changed from coctags.tld)- and configured my new project's (chamberofcommerce.jpx) library to c   More>>

I have a tag library with two tags: alphaDisplay.class and
categoryDisplay.class. My tld, validated by JBuilder 6, is coctags.tld.
Now realize that when I use those tags just in a Tomcat webapp (the
usual: jsp in root folder, tags in /classes/coctags/ and tld in
/WEB-INF/tlds/) then it works fine. The taglib is located and used to
access the tags. Keep that in mind. It works in Tomcat alone. The tld is
valid, the tags compiled and are accessed properly.


My problem is that I want to use the tags in JBuilder 6. So I created a
coctags.jar- the two tags and then META-INF/taglib (name changed from
coctags.tld)- and configured my new project's (chamberofcommerce.jpx)
library to coctags.jar (and properties to include all). I also put
coctags.tld (not taglib.tld), in /WEB-INF/. Then I altered the jsp that
worked in Tomcat alone so that it referred to the taglib descriptor in
the right place: <%@taglib uri="/WEB-INF/coctags.tld" prefix="tags" %> ,
instead of "/WEB-INF/tlds/coctags.tld" as in tomcat alone. Finally, I
referred to my tag, as I had in the other, non-Jbuilder implementation,
by "tags". (In fact the file is just copied and pasted from the other,
with the alteration on the tag-lib descriptor, as I mentioned). I do not
use the web.xml, right now, preferring to refer to the taglib directly,
since I want to get it to work before I start decoupling it for
scalability reasons.


I keep getting the following error:
"tagTest.jsp": Unable to load class coctags.alphaDisplay at line 14,
column 1


This tells me it is getting the tld, reading it and trying to access the
class, but cannot find it. Yet in the structure pane (top left), under
chamberofcommerce.jpx, there is a node that says "coctags" and when
expanded, shows the two classes. It is there, yet still nothing.


So my question is, what am I doing wrong?
Or even more basic. Assume the existence of a tag library named
coctags.jar that has the following structure:


alphaDisplay.class

categoryDisplay.class

META-INF/

....taglib.tld


Let's say I wanted to use this tag library in JBuilder. What would I do?
What do you do, given a tag library that you KNOW works. Maybe with a
step by step rehash of the details, I can get this to work. I've done
everything I can find to do (and JBuilder 6's documentation on using tag
libraries is non-existant, AFAIK.) I am getting very frustrated.


Thank you,

Ian Ohlander

   <<Less

Re: JBuilder and custom tag problems

Posted By:   Laurent_Mihalkovic  
Posted On:   Friday, July 12, 2002 02:01 AM

I am using tag libraries quite extensively in my current JBuilder based project. I have to say, i never ran into the same problem. The project was running in JBuilder 6, and now in JBuilder 7.

I will look at the project file tomorrow at the office, and send it to you.

cheers

About | Sitemap | Contact