Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Unable to find setter method for attribute: xCoord
Unable to find setter method for attribute: xCoord [message #188759] Wed, 28 February 2007 10:23 Go to next message
Eclipse UserFriend
Originally posted by:

Ok, I'm having trouble with a custom tag:-

The TLD (the relevant bits):-
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library
1.2//EN" "">



The Tag class...
public class MyTag extends TagSupport
private double xCoord;

private double yCoord;

... other stuff in here including doStartTag() ....

public double getXCoord()
return xCoord;
* @param coord the xCoord to set
public void setXCoord(double val)
this.xCoord = val;

* @return the yCoord
public double getYCoord()
return yCoord;
* @param coord the yCoord to set
public void setYCoord(double val)
this.yCoord = val;

The jsp...
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
<%@ taglib uri="" prefix="atag" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>




The problem is that I'm continually getting a runtime
exception--org.apache.jasper.JasperException: "Unable to find setter
method for attribute: xCoord"

Things I have tried already:-
setting the attrbute type to String, eg omitting the <type> in the tld
and having the setter method take a String.

I have checked that the code is recompiled and deployed correctly etc

I'm using Tomcat 5.5, Java1.5.0_11 and Eclipse Version: 3.2.2
Build id: M20070212-1330

So, the question is , why can't it find the setter method???
Re: Unable to find setter method for attribute: xCoord [message #188851 is a reply to message #188759] Thu, 01 March 2007 09:14 Go to previous message
Eclipse UserFriend
Originally posted by:

This problem appears to have been caused by naming the attributes xCoord
and yCoord. When I changed the names to xcoord and ycoord the code worked
Previous Topic:Europa WST 1.6.0
Next Topic:Internal server error when starting WebService explorer.
Goto Forum:

Current Time: Wed Oct 07 21:06:30 GMT 2015

Powered by FUDForum. Page generated in 0.12853 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software