struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kamholz, Keith (corp-staff) USX" <>
Subject RE: Cannot Find Bean In Scope Null?
Date Wed, 19 Jun 2002 14:35:15 GMT
This is extra confusing now, I've commented out the section the test to see
if the bean is empty and iterates it.  I still get the same error message.
I'm guessing the link to  / is the only spot where the bean might be

Keith Kamholz
East Aurora, NY
(716) 687-7282

-----Original Message-----
From: Kamholz, Keith (corp-staff) USX []
Sent: Wednesday, June 19, 2002 10:15 AM
To: Struts (E-mail)
Subject: Cannot Find Bean In Scope Null?

Hi everyone,
I've been having an issue for a while now with a couple of my ActionForm
beans.  I posted to the group before, and I've been working on several ways
to fix it, but nothing has worked.  My app is as follows (sorry, my
explanation is pretty long):
1) The user is taken to an intro page, where they enter a letter into a
2) The letter is stored in HeaderBean (an ActionForm, in scope session) and
user is taken to an edit page corresponding to the value of the letter.
3) The edit page has a link, and when clicked the user is taken to another
page containing a form which edits the rest of the properties in the
4) Control is returned to the edit page.  The values of the HeaderBean
properties are displayed there.
(This is where things go haywire)
On that page there are 3 nearly identical sections.  One is:

<logic:equal value="Mass Change" name="HeaderBean" property="operation">
  Mass Change Detail Information:  <br>
  <html:link page="/">Add</html:link><br>
  <logic:notEmpty name="mcItems" property="line">
    <logic:iterate id="mcLine" name="mcItems" property="line">
      <bean:write name="mcLine"/><br>
  <logic:empty name="mcItems" property="line">

What it does is tests the operation property of my HeaderBean, and then
displays the correct title with a link to fill info into one of my 3
problematic beans.  If there is info in the bean property, it is iterated
and displayed.  I'm not sure when a bean instance is created, but my only
guess was that it wasn't created until the user clicks on the link to add an
entry to the bean.  I tried to solve this with the <logic:empty> and
<logic:notEmpty> tags, but apparently those tags do not check the existence
of the bean.  (What do they do then?)
So now when my browser enters the body of the <logic:equal> I get an error
that says:
X Servlet Error: Cannot find bean mcItems in scope null:
javax.servlet.jsp.JspException: Cannot find bean mcItems in scope null

My actions and beans are clearly defined in my struts-config.xml, so I'm all
out of ideas.  My struts-config has this code:
<form-bean 	name="HeaderBean" 
<form-bean 	name="mcItems" 
(Plus my other form-beans)
<action	path="/AddMC"
		<forward name="edit" path="EditPage.jsp"></forward>
		<forward name="addMC" path="AddMC.jsp"></forward>
(Plus my other actions)

I'm all out of ideas.  What can I do about this issue?  Any input would be a
big help.  Thanks!

Keith Kamholz
East Aurora, NY
(716) 687-7282

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message