I have doubt in
JSP Expression Language. I tried example given on page 365 and 366 in HFSJ.
<%@ page import="foo.*"%>
<html>
<body>
<%--Normal java script code---1
<%= ((foo.Person) request.getAttribute("person")).getDog().getName()%>--%>
<%-- without java scripting -------2
<jsp:useBean id="person" class="foo.Person" scope="request" />
Dog's nam e is <jsp:getProperty name="person" property="dog"/> --%>
<!-- Using Expression Language --%>---3
Dog's name is: ${person.dog.name}
</body>
</html>
1 and 2 gives the output as expected.
However when i try to get the output using 3 i.e using EL, then i DONOT see wht is expected. I expected dog's name to be printed, however it simply prints the text i.e " Dog's name is: ${person.dog.name}"
What do i need to include in my JSP to make it work....
"