This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
foo.Person p = new foo.Person();
Where Person is abstract class and Employee extends Person and is concreate class.
Explanation given :
Fails at request time.The "person" attribute is stored at request scope,so the <jsp:useBean> tag won`t work since it specifies only a type.The CONTAINER knows that if you have only a type specified ,there must be an existing bean attribute of the name and scope.
According to my understanding if the attribute ("person") is already in request scope then the <jsp:useBean> will try to find the attribute by something like this in generated _jspService method by the container.
person = (foo.Employee)_jspx_page_context.getAttribute("person",PageContext.Request_Scope);
so if person if not null then there is no point of failure at request time and <jsp:getProperty> will print the name.