Link to home
Start Free TrialLog in
Avatar of NBee
NBee

asked on

Taglib

Hi all,
I have written a taglib with like this:
class abstract A extends TagSupport
{
protected int numItems;
public void setNumItems(String numItemsStr)
{
this.numItems = Integer.parseInt(numItemsStr);
}
}

class B extends A
{
public void setNumItems(String numItemsStr)
{
super.setNumItems(numItemsStr);
}
}

In taglib.tld, I also declase the attribute numItems.

Deploying onto Weblogic is OK, but when I browse a jsp file, it causes the error like this:
<b>Error in using tag library uri='/WEB-INF/tms.tld' prefix='tms': There is no setter method for property 'numItems', for Tag class '...'<b>
Could you please show me how to solve this???
Thanks,
Regards

ASKER CERTIFIED SOLUTION
Avatar of Neutron
Neutron

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NBee
NBee

ASKER

Thanks,
But you know, with those classes, I change the variable into rowCount (instead of numItems), nothing's wrong. I really don't know what kind of this error....

Thanks a lot!
It looks like you just needed to recompile :)
Did you try to change back to numItems after it worked for rowCount?

My suggestion is that you should analyse taglib entry in web.xml, tag entries in your.tld, recompile all classes, delete any previously used directories where you held classes for current webapp. All in all, just do a cleanup and it should work. I tried your classes on a clean Tomcat instance and everything is ok. If you have any doubts regarding configuring your webapp -> ask :-)

Best wishes,
    </ntr> :)

p.s. All these comments are free.
Btw, when your jsp is already compiled into a servlet, when you modify your java classes (ie. tag classes), you must restart Tomcat because classloader already loaded them. If you are using Orion instead of Tomcat - you don't have to.

Greetings,
    </ntr> :)
Avatar of NBee

ASKER

Oh, I do not use Tomcat, I use Weblogic 6.1. When I change back to numItems, I still get this error and now when I change again into rowCount, I also get this error.
Finally, i can not come over this error.

I have checked all the entries in web.xml or in .tld files (not only do I check this but also my partner does it with me).

Do you have any idea??

Thanks for your reply!
Does weblogic have any work or temp or cache directory where it caches compiled classes? If it has, you can try moving all contents of this directory somwhere else to force use of new compiled classes.

Greetings,
    </ntr> :)
Avatar of NBee

ASKER

Already tried. This error also happenned at the first time I deployed onto weblogic.

NBee,

The following questions are open, and have been open for some time. Further, your profile indicates you logged in as recently as Jan 29, 2002. Please resolve them within the next seven (7) days; following that period of time, I or one of the other Moderators will take action to close this question. Additionally, this list has been forwarded to Administration; please expect an email from them regarding your account's status.

https://www.experts-exchange.com/jsp/qShow.jsp?qid=11516478
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11529339
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11585158
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11697479
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11744478
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11766758
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11818478
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11905339
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11938458
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20003831
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20038010
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20127372
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20135883
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20136023
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20142078
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20142830
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20143154
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20144259
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20144370
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20148973
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20150132
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20153238
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20160626
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20162000
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20163157
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20163178
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20163242
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20163142
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20163674
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20165141
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20174284
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20184042
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20242564
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20242585
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20252565
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20259368

Further, you should note that the guidelines for questions suggest that an "Easy" question is worth 50 points.

Thank you for your attention to the above questions.

Netminder
Community Support Moderator
Experts Exchange
Admin notified of user neglect. Force/accepted by

Netminder
Community Support Moderator
Experts Exchange