This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

A problem about using <jsp:getProperty>  RSS feed

 
Yi-Ru Cai
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I write

in page1

and try this in page2 to get "world":


But it doesn't work
does this mean I always have to do <jsp:useBean id="hello" scope="session" class="hello.HelloBean" /> before using <jsp:getProperty name="hello" property="name" /> in the same page, even I create the object in another page first?

Thank you for your answering
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, you do not need to repeat the useBean action.

But the get and set property actions are obsoleted by the EL and JSTL. Why are you still using them in the first place?
 
Yi-Ru Cai
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:No, you do not need to repeat the useBean action.

But the get and set property actions are obsoleted by the EL and JSTL. Why are you still using them in the first place?

First , thanks for your replying
I am taking lessons about Servlet and JSP.
So I try to test whether if I can use script to put some objects in the sesson , and just use <jsp:getProperty....> to get the object and its property.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!