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

Discussion in 'Java' started by callme sanjay via JavaKB.com, Mar 1, 2005.

  1. 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
    callme sanjay via JavaKB.com, Mar 1, 2005
    #1
    1. Advertising

  2. callme sanjay via JavaKB.com

    Ryan Stewart Guest

    "callme sanjay via JavaKB.com" <> wrote in message
    news:...
    > 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.
    Ryan Stewart, Mar 2, 2005
    #2
    1. Advertising

  3. 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
    callme sanjay via JavaKB.com, Mar 2, 2005
    #3
  4. callme sanjay via JavaKB.com

    Ryan Stewart Guest

    "callme sanjay via JavaKB.com" <> wrote in message
    news:...
    > 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.
    Ryan Stewart, Mar 3, 2005
    #4
  5. 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
    Frederick Teoh via JavaKB.com, Mar 17, 2005
    #5
  6. callme sanjay via JavaKB.com

    haraul

    Joined:
    Apr 17, 2007
    Messages:
    1
    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
    haraul, Apr 17, 2007
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alexey Smirnov
    Replies:
    0
    Views:
    1,029
    Alexey Smirnov
    Feb 26, 2004
  2. kaeli
    Replies:
    5
    Views:
    15,904
    Sudsy
    Jan 5, 2004
  3. Nawab
    Replies:
    0
    Views:
    612
    Nawab
    Feb 19, 2004
  4. shruds
    Replies:
    1
    Views:
    783
    John C. Bollinger
    Jan 27, 2006
  5. Brummeline
    Replies:
    1
    Views:
    757
    Brummeline
    Mar 8, 2007
Loading...

Share This Page