You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Anoop <an...@india.hp.com> on 2002/10/07 09:00:27 UTC

Cannot find bean error

Hi,

	I am trying to loop through an ArrayList returnd by a bean inside
<logic:iterator>

	Name in the Iterator tag specifies a bean set in request scope in my
ActionBean, getter on which will return an ArrayList. I am trying to read
the bean returned by the ArrayList inside the Iterator tag. There is an
exception thrown:

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

I tried specifying all the possible scopes, session and request but it still
throw this exception

The scriptlet looks something like this:

<logic:iterate id="EMTTaskDetail" name="timesheetDetails"
property="taskDetails">

	  <tr class="welcometxt">

	    <td bgcolor="#f0f0f0"><p><bean:write name="EMTTaskDetail"
property="taskName"/></p></td> ...........

getTaskDetails() on the bean set in the request scope with key
"timesheetDetails" returns an ArrayList of EMTTaskDetail objects.

Thanks for your help.

Thanks & Regards,
Anoop.


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


Re: Cannot find bean error

Posted by Billy Ng <kw...@earthlink.net>.
Make sure your clsoing tag is right.  I had the similar error message when I
had an incorrect closing </html:form> tag.

Hope this helps!

Billy Ng

----- Original Message -----
From: "Anoop" <an...@india.hp.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Monday, October 07, 2002 12:55 AM
Subject: RE: Cannot find bean error


> I checked these out, and seems correct. Are there anything specific issues
> which have to be looked into.
>
> Anoop.
>
> -----Original Message-----
> From: deepank [mailto:deepank@sasken.com]
> Sent: Monday, October 07, 2002 1:12 PM
> To: Struts Users Mailing List; anoopra@india.hp.com
> Subject: Re: Cannot find bean error
>
>
> Hi,
>  I am not sure about this, but i have had this problem. Make sure your
bean
> follows the specifications of a Bean.
> All properties have getter/setter methods. Sometimes Struts(or reflection
i
> should say)  will not recognize your class as bean because if this.
> Also double check if your storing it in some scope in your Action class.
>
> Deepank
>
>
> ----- Original Message -----
> From: "Anoop" <an...@india.hp.com>
> To: <st...@jakarta.apache.org>
> Sent: Monday, October 07, 2002 12:30 PM
> Subject: Cannot find bean error
>
>
> > Hi,
> >
> > I am trying to loop through an ArrayList returnd by a bean inside
> > <logic:iterator>
> >
> > Name in the Iterator tag specifies a bean set in request scope in my
> > ActionBean, getter on which will return an ArrayList. I am trying to
read
> > the bean returned by the ArrayList inside the Iterator tag. There is an
> > exception thrown:
> >
> > javax.servlet.ServletException: Cannot find bean EMTTaskDetail in scope
> > null
> >
> > I tried specifying all the possible scopes, session and request but it
> still
> > throw this exception
> >
> > The scriptlet looks something like this:
> >
> > <logic:iterate id="EMTTaskDetail" name="timesheetDetails"
> > property="taskDetails">
> >
> >   <tr class="welcometxt">
> >
> >     <td bgcolor="#f0f0f0"><p><bean:write name="EMTTaskDetail"
> > property="taskName"/></p></td> ...........
> >
> > getTaskDetails() on the bean set in the request scope with key
> > "timesheetDetails" returns an ArrayList of EMTTaskDetail objects.
> >
> > Thanks for your help.
> >
> > Thanks & Regards,
> > Anoop.
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


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


RE: Cannot find bean error

Posted by Anoop <an...@india.hp.com>.
I checked these out, and seems correct. Are there anything specific issues
which have to be looked into.

Anoop.

-----Original Message-----
From: deepank [mailto:deepank@sasken.com]
Sent: Monday, October 07, 2002 1:12 PM
To: Struts Users Mailing List; anoopra@india.hp.com
Subject: Re: Cannot find bean error


Hi,
 I am not sure about this, but i have had this problem. Make sure your bean
follows the specifications of a Bean.
All properties have getter/setter methods. Sometimes Struts(or reflection i
should say)  will not recognize your class as bean because if this.
Also double check if your storing it in some scope in your Action class.

Deepank


----- Original Message -----
From: "Anoop" <an...@india.hp.com>
To: <st...@jakarta.apache.org>
Sent: Monday, October 07, 2002 12:30 PM
Subject: Cannot find bean error


> Hi,
>
> I am trying to loop through an ArrayList returnd by a bean inside
> <logic:iterator>
>
> Name in the Iterator tag specifies a bean set in request scope in my
> ActionBean, getter on which will return an ArrayList. I am trying to read
> the bean returned by the ArrayList inside the Iterator tag. There is an
> exception thrown:
>
> javax.servlet.ServletException: Cannot find bean EMTTaskDetail in scope
> null
>
> I tried specifying all the possible scopes, session and request but it
still
> throw this exception
>
> The scriptlet looks something like this:
>
> <logic:iterate id="EMTTaskDetail" name="timesheetDetails"
> property="taskDetails">
>
>   <tr class="welcometxt">
>
>     <td bgcolor="#f0f0f0"><p><bean:write name="EMTTaskDetail"
> property="taskName"/></p></td> ...........
>
> getTaskDetails() on the bean set in the request scope with key
> "timesheetDetails" returns an ArrayList of EMTTaskDetail objects.
>
> Thanks for your help.
>
> Thanks & Regards,
> Anoop.
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


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



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


Re: Cannot find bean error

Posted by deepank <de...@sasken.com>.
Hi,
 I am not sure about this, but i have had this problem. Make sure your bean
follows the specifications of a Bean.
All properties have getter/setter methods. Sometimes Struts(or reflection i
should say)  will not recognize your class as bean because if this.
Also double check if your storing it in some scope in your Action class.

Deepank


----- Original Message -----
From: "Anoop" <an...@india.hp.com>
To: <st...@jakarta.apache.org>
Sent: Monday, October 07, 2002 12:30 PM
Subject: Cannot find bean error


> Hi,
>
> I am trying to loop through an ArrayList returnd by a bean inside
> <logic:iterator>
>
> Name in the Iterator tag specifies a bean set in request scope in my
> ActionBean, getter on which will return an ArrayList. I am trying to read
> the bean returned by the ArrayList inside the Iterator tag. There is an
> exception thrown:
>
> javax.servlet.ServletException: Cannot find bean EMTTaskDetail in scope
> null
>
> I tried specifying all the possible scopes, session and request but it
still
> throw this exception
>
> The scriptlet looks something like this:
>
> <logic:iterate id="EMTTaskDetail" name="timesheetDetails"
> property="taskDetails">
>
>   <tr class="welcometxt">
>
>     <td bgcolor="#f0f0f0"><p><bean:write name="EMTTaskDetail"
> property="taskName"/></p></td> ...........
>
> getTaskDetails() on the bean set in the request scope with key
> "timesheetDetails" returns an ArrayList of EMTTaskDetail objects.
>
> Thanks for your help.
>
> Thanks & Regards,
> Anoop.
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


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


RE: Cannot find bean error

Posted by Victor CHEVALIER <vc...@avs-consulting.com>.
javax.servlet.ServletException: Cannot find bean EMTTaskDetail in scope null

This doesn't mean your scope is not valid but that there is no bean in the
scope you specified. So if you specified no scope, this mean there is no
bean in 'memory'.
Verify the tag <logic:iterator> (logic taglib definition).

On another side, if you iterate through an array of specified Objects, you
must provide a type in the iterate tag.

-----Message d'origine-----
De : Anoop [mailto:anoopra@india.hp.com]
Envoyé : lundi 7 octobre 2002 09:00
À : struts-user@jakarta.apache.org
Objet : Cannot find bean error


Hi,

	I am trying to loop through an ArrayList returnd by a bean inside
<logic:iterator>

	Name in the Iterator tag specifies a bean set in request scope in my
ActionBean, getter on which will return an ArrayList. I am trying to read
the bean returned by the ArrayList inside the Iterator tag. There is an
exception thrown:

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

I tried specifying all the possible scopes, session and request but it still
throw this exception

The scriptlet looks something like this:

<logic:iterate id="EMTTaskDetail" name="timesheetDetails"
property="taskDetails">

	  <tr class="welcometxt">

	    <td bgcolor="#f0f0f0"><p><bean:write name="EMTTaskDetail"
property="taskName"/></p></td> ...........

getTaskDetails() on the bean set in the request scope with key
"timesheetDetails" returns an ArrayList of EMTTaskDetail objects.

Thanks for your help.

Thanks & Regards,
Anoop.


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


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