• Post Reply Bookmark Topic Watch Topic
  • New Topic

useBean action

 
George Pavamani
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let us suppose if i have a statement in my jsp page like
<jsp:getProperty name ="xyz" property = "abc"/>
Is it necessary that i must have declared
<jsp:useBean id = "xyz" ...../> earlier in the code?
I mean , what if i use a code like "session.setAttribute("xyz", someobject) earlier in the code but not useBean tag, will it work??
we know that the value of the name attribute in jsp:setProperty and jsp:getProperty will refer to an object that is obtained from the pageContext object thrugh its findAttribute() method. SO i don't see a reason why it shouldn't work.
Is my understanding correct??. Please correct me if i am wrong
Thanks
George
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried it?
bear
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!