| Author |
confusion in <jsp:useBean>
|
avi sinha
Ranch Hand
Joined: Mar 15, 2009
Posts: 452
|
|
this will set the value of property "name" as person1 if the attribute person is not available.
but what can we do to set the value of the property dog which is an object not string.??? { as we are giving a value in quotes here}
class Dog:
class Person:
please help!!! i have tried alot but everytime i got an Exception
avi sinha
|
SCJP 5.0 SCWCD 5.0
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
The error message tells you there's a problem in index.jsp.
Check the line indicated in the error message, or post the code here.
|
[My Blog]
All roads lead to JavaRanch
|
 |
avi sinha
Ranch Hand
Joined: Mar 15, 2009
Posts: 452
|
|
Christophe Verré wrote:The error message tells you there's a problem in index.jsp.
Check the line indicated in the error message, or post the code here.
i know what the problem is ? i was trying to assign a variable to the value parameter in the <jsp:setProperty>.
i just want to know that, is there any method by which we can set the property dog here using <jsp:setProperty> inside <jsp:useBean>
or setting value like this is valid for only string type properties.
avi sinha
|
 |
avi sinha
Ranch Hand
Joined: Mar 15, 2009
Posts: 452
|
|
got the answer. we can write "<% ... %>" must be inside quotes
thanks
avi sinha
|
 |
Chinmaya Chowdary
Ranch Hand
Joined: Apr 21, 2008
Posts: 432
|
|
|
Hi Avi. Here 'value' attribute not only used for strings. We can also use jsp expressions, EL.
|
 |
avi sinha
Ranch Hand
Joined: Mar 15, 2009
Posts: 452
|
|
thanks chinmaya
i was rying without quotes.. that was the problem.
anyway thanks
avi sinha
|
 |
 |
|
|
subject: confusion in <jsp:useBean>
|
|
|