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>I went to the generated .Java file for the JSP .. its throwing an exception at this line :
if (pageContext != null) pageContext.handlePageException(t);
On Monday, March 3, 2003, at 11:24 PM, Erik Price wrote:
Mufaddal Khumri wrote:
[...]
In my JSP page i have the following code
/ /--------------------------------------------------------------------- -- ----------------
<jsp:useBean id="myBean" class="MyBean" scope="session">
<jsp:setProperty name="faqHelper"
property="dbReader"
value="<%= session.getAttribute("DBWRITER")%>" />
<jsp:setProperty name="faqHelper"
property="dbWriter"
value="<%= session.getAttribute("DBWRITER")%>" />
</jsp:useBean>
/ /--------------------------------------------------------------------- -- ----------------
I get the following error in my log file:
2003-03-03 10:23:51 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: FAQHelper
In your <jsp:setProperty> tags, the "name" attribute should be the same as a JavaBean instance identified with the "id" attribute of <jsp:useBean>.
So maybe it should look like this:
<jsp:useBean id="faqHelper" class="MyBean" scope="session"/> <jsp:setProperty name="faqHelper" property="dbReader" value="<%= session.getAttribute("DBWRITER") %>"/>
etc.
Also you may need to downcast the value returned from session.getAttribute().
Erik
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
