| Author |
useBean
|
amarkirt saroay
Ranch Hand
Joined: Mar 16, 2008
Posts: 167
|
|
If we have request.setAttribute("emp",e);
and In <jsp:useBean id="emp" scope="request" class="com.example.Employee" >
which of the following are correct to have ?
<jsp:setProperty name="emp" property="name" value="kt"/>
or <jsp:setProperty name="e" property="name" value="kt"/>
Which one is correct value for name attribute of setProperty and same way for getProperty also?
<jsp:getProperty name="emp" property="name"/>
or <jsp:getProperty name="e" property="name"/>
|
SCJP-75%
SCWCD-82%
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
The name of the getProperty/setProperty must match the id of the bean. In your case, the id is "emp".
You can check this kind of thing in the JSP specification.
|
[My Blog]
All roads lead to JavaRanch
|
 |
 |
|
|
subject: useBean
|
|
|