Mufaddal Khumri wrote:
I downcasted but it did not help.
<jsp:useBean id="faqHelper" class="FAQHelper" scope="session">
<jsp:setProperty name="faqHelper"
property="dbReader"
value="<%= (Object)session.getAttribute("DBREADER")%>" />
<jsp:setProperty name="faqHelper"
property="dbWriter"
value="<%= (Object)session.getAttribute("DBWRITER")%>" />
</jsp:useBean>
That's not downcasting, because the "getAttribute" methods return their values as type Object by default. Unless you really are storing instances of Object in your session.
I also noticed that your FAQHelper class is not in a package. IIRC you need to package all of your classes as of Java 1.4.
Go to the FAQHelper class, use a package declaration to put it into a class, similar to this:
package com.wmotion.mypackage;
Now in your JSP you should use the following syntax:
<jsp:useBean id="faqHelper" class="com.wmotion.mypackage.FAQHelper" scope="session"> <jsp:setProperty name="faqHelper" property="dbReader" value="<%=(MySpecialSubclass) session.getAttribute("DBREADER")%>"/> <jsp:setProperty name="faqHelper property="dbWriter" value="<%=(MyOtherSubclass) session.getAttribute("DBWRITER")%>"/> </jsp:useBean>
Hope that helps
Erik
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]