• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing Java Bean Using JSP Action Tag

 
Krishna Potluri
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Two java beans with names Person.java and Dog.java
My question is how to set property Dog of Person java bean using
action tag in temp.jsp.



Thanks in advance.

Thanks and Regards,
Krishna.
 
Satish SN
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Krishna,

<jsp:setproperty> action tag has limitations that is action tag can set values of primitive datatypes by introspection of java bean like string,int so on

In order to set userdefined class object properties jsp has given
EL shortname for (Expression Language) this is one of the important concepts for SCWCD exam using EL we can set the properties of bean which are user defined
 
Krishna Potluri
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Satish,
Thanks for giving reply.

If i am not wrong, we can use EL to retrive the data from any scoped object or bean.

If we can set the property of the bean using EL ,could you please give me the example how to set the property of the bean if the property is an Object type.

Thnaks in advance.

Thanks and Regards,
Krishna.potluri
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic