aspose file tools
The moose likes JSP and the fly likes useBean action Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "useBean action" Watch "useBean action" New topic
Author

useBean action

George Pavamani
Ranch Hand

Joined: Jan 31, 2002
Posts: 31
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

Joined: Jan 10, 2002
Posts: 56185
    
  13

Have you tried it?
bear


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: useBean action
 
Similar Threads
Creating a java bean in a servlet and accessing it in a jsp
page attributes set using jsp:useBean
how to use the tag library provided by apache
jsp:useBean
how to use apache taglib correctly?