Hi all,

I have a Report bean, a ReportForm and a report.jsp.
ReportForm has a property called report of type Report. Hence it is using
the underlying report as storage.
In report.jsp, I refer to forms's properties as report.aProperty,
report.anotherProperty.
Report has a units property of type Hashtable. This hashtable contains
values of type Unit.

Config-struts looks like this:

    <action    path="/report"
               type="myApp.ReportAction"
               name="reportForm"
              scope="session"
              input="/jsp/report.jsp">
      <forward name="unit"  path="/jsp/unit.jsp"/>
    </action>

Yet,

When I try to iterate using

<logic:iterate name="report" property="units" id="unit">
  <bean:write name="unit" property="owner"/>                    // owner is a property 
of
unit
</logic:iterate>

I get

javax.servlet.ServletException: Cannot find bean unit in scope null

I tried other variations of the iterate.

Now, when I look at the example that comes with Struts, I see the user
variable of type User being added to the session in the login action, before
it gets used in the registration.jsp. If I understand Struts, in my case,
reportForm that is defined in struts-config, scope=session, should be same
as adding reportForm programmatically. But apparently it isn't. Or is it? :)
Any idea?

Thanks,
--a

Reply via email to