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

  • Thread starter callme sanjay via JavaKB.com
  • Start date
C

callme sanjay via JavaKB.com

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
 
R

Ryan Stewart

callme sanjay via JavaKB.com said:
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.
 
C

callme sanjay via JavaKB.com

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..
 
R

Ryan Stewart

callme sanjay via JavaKB.com said:
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.
 
F

Frederick Teoh via JavaKB.com

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.
 
Joined
Apr 17, 2007
Messages
1
Reaction score
0
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top