Hi
I have a problem with the action <jsp:setProperty name="foo" property="*" />.
I have a bean with a simple property of type Integer.
The Bean has  get and set method for this property.
Here the code of the bean:

package m;
public class Bug extends Object {
    Integer field1 = new Integer(0);

    public Bug() {
    }

    public Integer getField1() {
        return field1;
    }

    public void setField1(Integer field) {
        this.field1 = field;
    }
}

Here the code of JSP.

<%@ page contentType="text/html;charset=ISO-8859-1"%>
<jsp:useBean id="variable1" scope="page" class="m.Bug" />
<jsp:setProperty name="variable1" property="*" />
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<TITLE>
Hello World
</TITLE>
</HEAD>
<BODY>
The value is : <jsp:getProperty name="variable1" property="field1"/>
<form action="untitled1.jsp" method="get">

<input name="field1" value="1" type="text">
<input type="submit">

</form>
</BODY>
</HTML>

When I submit this Jsp I've the value of Bean´s property is 0.
What´s Wrong ? It´s a Bug?
thanks. 

Reply via email to