Erro em TagLib

Mais um hehe

Estou fazendo um taglib para redimensionamento de imagens, e talz:

<%@ taglib uri="/WEB-INF/tags/image.tld" prefix="image"%>

<image:resize src="<%=request.getRealPath("/teste/images/Filipe501.jpg")%>" width="100" height="75" newsrc="<%=request.getRealPath("/teste/images/Filipe501_p.jpg")%>" />

arquivo tld:

<?xml version="1.0" encoding="iso-8859-1" ?> 
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" 
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> 

<taglib>
 
	<tlibversion>1.0</tlibversion> 
	<jspversion>1.1</jspversion> 
	<shortname>Image Resize</shortname> 
	<info>Tag's redimencionamento de imagens...</info> 
	
	<tag> 
		<name>resize</name> 
		<tagclass>lucasferreira.ImageResizeTag</tagclass>
		<body-content>EMPTY</body-content>
		<bodycontent>JSP</bodycontent> 
		<info>redimensiona...</info>
		<attribute>
			<name>src</name>
			<required>true</required>
			<rtexprvalue>true</rtexprvalue>
		</attribute>
		<attribute>
			<name>width</name>
			<required>true</required>
			<rtexprvalue>true</rtexprvalue>
		</attribute>
		<attribute>
			<name>height</name>
			<required>true</required>
			<rtexprvalue>true</rtexprvalue>
		</attribute>
		<attribute>
			<name>newsrc</name>
			<required>false</required>
			<rtexprvalue>true</rtexprvalue>
		</attribute>
	</tag>
  
</taglib>

parte da class:

	private String src = null;
	private String newsrc = null;
	private int width = 0;
	private int height = 0;
	
	public ImageResizeTag(){}
	
	public void setSrc(String val) throws IOException {
		this.imgOriginal = ImageIO.read(new File(src));
		this.src = val;
	}
	
	public String getSrc(){
		return this.src;
	}	
	
	public void setNewsrc(String val){
		this.newsrc = val;
	}
	
	public String getNewsrc(){
		return this.newsrc;
	}
	
	public void setWidth(String val){
		width = Integer.parseInt(val);
	}
	
	public void setHeight(String val){
		height = Integer.parseInt(val);
	}

e quando tempo executar a tag o Server emite o erro:

org.apache.jasper.JasperException: /teste/banco_teste.jsp(98,0) Unable to find setter method for attribute: width

mais o seter da Width ta definido não sei pq ele não acha…

Alguém sabe algo q pode me ajudar??

Abracetas… :wink:

[size=“11”]
[color=“red”]

  • Editado: Aumente as chances de alguém responder o seu tópico. Use BBCode em seus códigos para mantê-los identados e mais legíveis para outros usuários. - Matheus[/color][/size] :joia:

vlw a dica do BBCode matheus

aí galera ja resolvi, descobrir q width e height no metodo set não pode ser int, e sim so na hr do get huahau estranho mais funcou so string!

Abracetas… :wink: