| Author |
jsp:getProperty gives null
|
sameera liyanage
Ranch Hand
Joined: Nov 25, 2008
Posts: 690
|
|
I created bean class in my package.
how i set the values for bean class using jsp setproperty
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
|
|
 |
sameera liyanage
Ranch Hand
Joined: Nov 25, 2008
Posts: 690
|
|
but still it gives null
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
|
the useBean instance is different . give the id attribute name as same name
|
 |
sameera liyanage
Ranch Hand
Joined: Nov 25, 2008
Posts: 690
|
|
I change it as below.then it says " duplicate local variable name mybean "
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
if you want to get the value just use <jsp:getProperty name="mybean" property="name"/> . no need to create the same bean again.
it is like below.which will cause compile time error.
|
 |
 |
|
|
subject: jsp:getProperty gives null
|
|
|