Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Error in tag lib : saying "unable to find setter method for attribute"

Reply
Thread Tools

Error in tag lib : saying "unable to find setter method for attribute"

 
 
callme sanjay via JavaKB.com
Guest
Posts: n/a
 
      03-01-2005
Hello Team,

I am facing a problem in taglib

Initally I was using JSDK 1.4.2_05 for compiling and running my application
everythign was running very fine , now the JRE & JDK change to 1.4.2_07 and
suddenly it starts giving me error saying "unable to find setter method for
attribute "

I am using tomcat 4.1.29

Please let em know if anyone already have any idea about this

-Sanjay

--
Message posted via http://www.javakb.com
 
Reply With Quote
 
 
 
 
Ryan Stewart
Guest
Posts: n/a
 
      03-02-2005
"callme sanjay via JavaKB.com" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed).. .
> Hello Team,
>
> I am facing a problem in taglib
>
> Initally I was using JSDK 1.4.2_05 for compiling and running my application
> everythign was running very fine , now the JRE & JDK change to 1.4.2_07 and
> suddenly it starts giving me error saying "unable to find setter method for
> attribute "
>
> I am using tomcat 4.1.29
>
> Please let em know if anyone already have any idea about this
>

Simply upgrading your JDK wouldn't cause this. It's caused by specifying an
attribute in a TLD but no corresponding setter method in the tag handler class.


 
Reply With Quote
 
 
 
 
callme sanjay via JavaKB.com
Guest
Posts: n/a
 
      03-02-2005
Hello,

But I don;t know the problem occures only when I changed the JSDK version
from 1.4.2_05 to 1.4.2_07

Now to resolve this problem in 1.4.2_07 I changed the getter setter method
and now it starts workign fine ..

INITALL the methodes were
=========================

public void setPoll(int seconds) {

}
public int getPoll(int seconds) {
return seconds;
}

public InitAutoRefreshTag () {
super();
}

Now they got changed to , so there is no problme
===============================================

private int seconds = -1;
public void setPoll(int seconds) {
this.seconds= seconds;
}
public int getPoll() {
return this.seconds;
}

public InitAutoRefreshTag () {
super();
}


Please let me know your thoughts on it..

--
Message posted via http://www.javakb.com
 
Reply With Quote
 
Ryan Stewart
Guest
Posts: n/a
 
      03-03-2005
"callme sanjay via JavaKB.com" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed).. .
> Hello,
>
> But I don;t know the problem occures only when I changed the JSDK version
> from 1.4.2_05 to 1.4.2_07
>
> Now to resolve this problem in 1.4.2_07 I changed the getter setter method
> and now it starts workign fine ..
>
> INITALL the methodes were
> =========================
>
> public void setPoll(int seconds) {
>
> }
> public int getPoll(int seconds) {
> return seconds;
> }
>
> public InitAutoRefreshTag () {
> super();
> }
>
> Now they got changed to , so there is no problme
> ===============================================
>
> private int seconds = -1;
> public void setPoll(int seconds) {
> this.seconds= seconds;
> }
> public int getPoll() {
> return this.seconds;
> }
>
> public InitAutoRefreshTag () {
> super();
> }
>
>
> Please let me know your thoughts on it..
>

Tag libraries tend to behave a bit oddly at times. Not having a "seconds"
property may have caused your problem. If that original code did what you
wanted, though, I'd say you have some serious design issues.


 
Reply With Quote
 
Frederick Teoh via JavaKB.com
Guest
Posts: n/a
 
      03-17-2005
Agreed with Ryan. I faced the same error as stated. When I see "Tag
libraries tend to behave a bit oddly at times" by Ryan, I restarted the
server and it works. OMG, I spent hours trying to figure out this but
somehow the solution is restarting the server. Unbelievable.

--
Message posted via http://www.javakb.com
 
Reply With Quote
 
haraul haraul is offline
Junior Member
Join Date: Apr 2007
Posts: 1
 
      04-17-2007
Dear Experts,

I am trying to deploy a project on JBOSS which is already running on OC4J container.

But facing a strange problem...it give a compile time error as:
BUILD FAILED
org.apache.jasper.JasperException: /jsp/displaytimesheet.jsp(208,12) Unable to find setter method for attribute: editMode

This same code is working on oracle container and there is setter method in jar file and attribute entry in tld file....don't know where or what is wrong?

Does anybody has some clue?

Thanks in advance.
Haraul
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
calling setter method from initialize method Le Wang Ruby 2 08-13-2011 06:44 PM
unable to find setter method for attribute: newspapercolumns Brummeline Java 1 03-08-2007 10:00 AM
JSTL version Tomcat vs Resin - Unable to find setter method - set(Object) kebabkongen@hotmail.com Java 2 11-14-2006 11:42 AM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
JSP taglib: Unable to find setter method for attribute kaeli Java 5 01-05-2004 07:15 PM



Advertisments