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]



Reply via email to