java.lang.ClassCastException: java.lang.Object
at javax.servlet.jsp.tagext.TagData.getAttributeString(TagData.java:165)
Here is what I have in my JSP page:
<%@ taglib uri="Students-tags" prefix="students" %>
<%
String studentID = (String)session.getAttribute("studentID");
%>
<students:Register studentID="<%=studentID%>" />
<%
My TLD file looks like this:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.0</tlibversion>
<shortname>ejb2jsp generated tag library</shortname>
<tag>
<name>Register</name>
<tagclass>EJBs.Students.jsp_tags._Students_RegisterTag</tagclass>
<teiclass>EJBs.Students.jsp_tags._Students_RegisterTagTEI</teiclass>
<info>
attribute 'studentID' expects java type 'java.lang.String'
</info>
<attribute>
<name>studentID</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</taglib>
And my Web.xml file does have the following entry:
<taglib>
<taglib-uri>
Students-tags
</taglib-uri>
<taglib-location>
/WEB-INF/Students-tags.tld
</taglib-location>
</taglib>
Does anybody know what is the cause of this exception ?