Hi,
so it is seen that the name attribute has to be an id of some bean. Hence somewhere before the getProperty tag the useBean tag has to be there.
I was also thinking in the same direction. But the above posted code excuted without error. I tested it on
tomcat and Sn
Java Application Server 8.1. I addition to this, if I try
<jsp:useBean id="pr" class="mypackage.Person">
<jsp:setProperty name="pr" property="name" value="narendra"/>
</jsp:useBean>
<% Person p = new Person();
p.setName("SomeName");
pageContext.setAttribute("pr", p);
%>
The in the same program, I use the following
<jsp:getProperty name="pr" property="name" />
It is printing "SomeName" not "narendra"
Thanks
Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0