• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

<jsp:usebean ... body

 
geeta vemula
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if we have

<jsp:usebean id="someBean" class="xyz.SomeBeanClass" >
----
</jsp:usebean>

here we can set the properties of bean using setProperty of usebean. But i want to know what are the other ways we can set the bean property

like can we set as shown below

someBean.someproperty="value" or
<% SomeBeanClass.setSomeProperty(value); %>

Kindly clear my doubt.
Thanks,
Geeta
 
Chinmaya Chowdary
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Geeta. We can use any valid JSP elements inside <jsp:useBean ...></jsp:useBean> tag.
 
geeta vemula
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that means we can use scriplets, expressions ,declarations or directives in <jsp:usebean..>?

Thanks,
Geeta
 
Chinmaya Chowdary
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, including EL, JSTL, custom tags.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic