What it means by saying, "setProperty code will not be executed if the bean with the id already exists"....what exactly does that mean?? For example, assume that the id is a person with a name, so the setProperty won't be executed if the person has already a name?? Am I right?? Anyone please help me.
Now, my question is that if I don't give the values joe and soap, what will the o/p be if I execute the above jsp page?? Help me please guys. [ January 01, 2007: Message edited by: Jothi Shankar Kumar Sankararaj ]
If the container is able to find a bean named person in the Session scope, then the <jsp:setProperty> will be skipped. Otherwise, if it is unable to find an object named person in the session scope, then a new object of com.bean.Person will be created and the name property will be set to the value "x".
The <jsp:setProperty> is like passing a value to the constructor of the bean while initializing.
SCJP 1.2 <br />SCWCD (94%)<br />SCBCD (preparing)
Joined: Dec 25, 2006
Now, my question is that if I don't give the values joe and soap, what will the o/p be if I execute the above jsp page?? Help me please guys.
if you dont give any default values, null will be print.