You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Howard Miller <h....@admin.gla.ac.uk> on 2002/08/26 17:20:08 UTC

Request Beans Sanity Check

Hi,

Having problems creating beans on the fly. Can somebody spot where I have
gone wrong...

This is my (obviously incorrect) understanding of the procedure:

1. I create a bean called MyBean
2. an action script creates an instance of the MyBean class, called (say) MB
and initialises it... so far so good
3. add the bean to the request scope in the action "request.setAttribute(
"MyBean", MB );

.... the action forwards to a .jsp page (correctly)

4. the page tries to access a collection defined in the bean:
"<logic:iterate id="item" name="MyBean" property="MyCollection> ..etc..

result: "Cannot find bean MyBean in any scope"
what might I be doing wrong?  Any help appreciated.

Howard

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>