wood burning stoves 2.0*
The moose likes JSP and the fly likes jsp  usebean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp  usebean" Watch "jsp  usebean" New topic
Author

jsp usebean

sandeep Talari
Ranch Hand

Joined: Dec 24, 2007
Posts: 63
hello,

abstract class Person
{
String getName(){}
void setName(String){}
}

class Employee extends Person
{
int getEmpId()
{}
void setEmpId(int)
{}
}
servlet

Employee p = new Employee)_;
p.setName("evan");
request.setAttribute("person", p);

<jsp:useBean id ="person" type="Employee" >
<jsp: setProperty name ="person" property ="name" value="fred"/>
</jsp:useBean>

<jsp:getProperty name="person" property ="name"/>

how this will work since the set attribute in request scope and here in jsp the default scope we specified is page... explain me
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
It should not work. what did you get when you tested it?


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
Don't get me started about those stupid light bulbs.
 
subject: jsp usebean
 
Similar Threads
unable to access requested scoped attribute in page scoped JSP
<jsp:useBean> K&B Standard Action Question on page 358.
Doubt in use bean
UseBean error
doubt on jsp:useBean tag