Hello,

I have a bean like this :


package be.eTrust.trustedSeal.service.bean;

import com.objectmatter.bsf.*;
import java.util.*;

public class Account_test {

    //attributes
    public Integer ACCOUNT_TEST_ID;
    public String ACCOUNT_TEST_DESCRIPTION;
    public String ACCOUNT_TEST_DATE;
    public int nombre;

    private StringBuffer error_message = null;


    //constructor
    public Account_test()
    {
        error_message = new StringBuffer();
        //nombre = new Integer(0);
    }

    public int getNombre() {
        return nombre;
    }
    public String getErrorMessage()
    {   if (error_message == null)
            return "";
        else
             return error_message.toString();
    }


    public void setNombre(String newnbr) {

        try
        {
            nombre = Integer.parseInt(newnbr);
        }
        catch(NumberFormatException e)
        {
            error_message.append("Nbr err");
            error_message.append("<BR>");
            nombre = 77;
        }
    }

    }

    public void resetError()
    {
        error_message.delete(0, error_message.length());
    }

    public boolean isOk()
    {
        if (error_message.length()>0)
         return false;
        else
         return true;
    }
...
}


I have this field in a form :
<INPUT TYPE="text" name="nombre" value= <jsp:getProperty name="account_test"
property="nombre" /> >


and this command to set the nombre variable in the bean :

<jsp:setProperty name="account_test" property="nombre" param = "nombre"/>

When I execute my jsp,
I have this error :
org.apache.jasper.JasperException: Can't find a method to write property
'nombre' in a bean of type ...

however I have a getNombre and a setNombre method ...
Do you have an explanation ?

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to