• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP's setProperty

 
Nicky Eng
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what are the attributes for setProperty?
because some mock exam questions i've done having the different answer.

here is my knowledge but if i'm wrong pls correct me.
setProperty's attribute
-------------
name
property
value

-------------

anyone else wanna add more or disagree?
 
Manju Devarla
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As for my knowledge these are the three attributes for jsp:setProperty
 
Mahesh Desai
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nicky,

That mock exam question should be wrong.

Regards,
Mahesh
 
NDP Prasad
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
setProperty tag
This tag takes four attributes :
�� name : the bean name;
�� class : the bean type;
�� property : name of the bean property;
�� value : the value to give to the bean property;
�� param : name of a request parameter (param value is used to set property value).
 
kumar chandra
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no class attribute in setProperty.
name attribute is representing the object of class which you define in jsp:useBean action.
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
NDP,

Are you sure about this?? Do we have class?? I dont think so...What ranchers??
 
NDP Prasad
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, Class should not be there.
 
Mahesh Desai
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<jsp:setProperty> has four attributes 1]name 2]property 3]param 4]value.
value and param attributes are never used together and are both optional. name and preperty attributes are mandatory.

Thanks,
Mahesh

--------------------
SCJP 1.4 | SCWCD 1.4 | SCBCD 1.3 | SCEA Part I - In Progress
 
Nicky Eng
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mahesh Desai:
<jsp:setProperty> has four attributes 1]name 2]property 3]param 4]value.
value and param attributes are never used together and are both optional. name and preperty attributes are mandatory.

Thanks,
Mahesh

--------------------
SCJP 1.4 | SCWCD 1.4 | SCBCD 1.3 | SCEA Part I - In Progress


thanks so much about the details. So there is a param in setProperty and it never used together with value.
I got it:
-------
name
property
value / param
-------

thanks for all giving me the info.
thanks for much.

tomorrow i will sit for the test.
wish me all the best.
 
Mahesh Desai
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Nicky,

Good Luck for the Exam!

Thanks,
Mahesh

--------------------
SCJP 1.4 | SCWCD 1.4 | SCBCD 1.3 | SCEA Part I - In Progress
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic