Hello sir, madam
I have written the
jsp page as follows
<%@ page import="businessData.visitorAddresses.*"%>
<%pageContext.setAttribute("abc","Hello"); %>
<jsp:useBean id="abc" class="businessData.visitorAddresses.AddressBean" scope="page">
<jsp:setProperty name="abc" property="name" value="Ram"/>
<jsp:setProperty name="abc" property="city" value="Pune"/>
<jsp:setProperty name="abc" property="state" value="MH"/>
</jsp:useBean>
<%=pageContext.getAttribute("abc")%>
I was shocked to see that I got a ClassCastException
Bean classes are well defined and are accessible without any problems. What I noticed is that pageContext.findAttribute() is being used in jsp:setProperty and thats why my
string attribute named "abc" got a ClassCastException.
I guess this is a
tomcat bug if I am not wrong
Waiting for your suggestions.