facebook

JSTL: Unable to find setter Method for attribute:

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #253501 Reply

    ferenjito
    Member

    Hello there,

    I have a strange problem with a self-made tag library:

    Jsp:
    Code:

    <mytools:createbean type=”Booking” name=”booking” />

    TLD:
    Code:

    <tag>
    <name>createbean</name>
    <tagclass>tag.TagCreateBean</tagclass>
    <bodycontent>jsp</bodycontent>

    <attribute>
    <name>name</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>type</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>

    </tag>

    Tag Class :
    Code:


    String type;
    String name;

    public void setName(String name) {
    this.name = name;
    }

    public void setType(String b) {
    this.type = b;
    }

    …..

    Obviously the TLD demands an attribute ‘type’ and there is a setter Method provided for the atttribute in the Tag Class. Funnily, the Parser does not stop warning me :
    Unable to find setter Method for attribute: type, Even if I restart Eclipse.
    The Application works fine though, so the Problem is only on Parsing level and does not have any Effect on the Program. But it is still ugly and looks like a Parser Bug.
    Is there a way to get rid of that?

    Thanks,
    Ferenjito

    P.S I am using MyEclipse 4.1.0 together with Eclipse 3.1.2

    #253594 Reply

    Riyad Kalla
    Member

    Ferenjito,
    Are you working with a web project or a plain Java project? What does your @taglib entry look like at the top of your JSP file? Any web.xml entries for the taglib?

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: JSTL: Unable to find setter Method for attribute:

You must be logged in to post in the forum log in