Hi all,

I have a basic question to ask,
If i have a java bean class as

package vikram;
public class MyBean{
        private String strIdentity;
        private String strName;

        // the method name is diff. i.e from the variable name.
        public void setIdentity(String strIdentity){
                this.strIdentity = strIdentity;
        }
        public String getIdentity(){
                return this.strIdentity;
        }
}

and in my jsp i shall call from A.jsp page:

<jsp:useBean id="myBean" class="vikram.MyBean" scope="page" />
<jsp:setProperty name="myBean" property="identity" value="vikram" />

Will this work or not. Some guys were saying it will not work since the
method name should be the same as the variable name
i.e. public void setStrIdentity(){}


Regards,
Vikram.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to