wood burning stoves*
The moose likes JSP and the fly likes A problem about using <jsp:getProperty> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "A problem about using <jsp:getProperty>" Watch "A problem about using <jsp:getProperty>" New topic
Author

A problem about using <jsp:getProperty>

Yi-Ru Cai
Greenhorn

Joined: Jun 01, 2012
Posts: 4
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

Joined: Jan 10, 2002
Posts: 61646
    
  67

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?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Yi-Ru Cai
Greenhorn

Joined: Jun 01, 2012
Posts: 4
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A problem about using <jsp:getProperty>