You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bradley Wagner <br...@hannonhill.com> on 2006/11/14 00:36:29 UTC

Console error message for a working tag

I'm not too worried about this because it seems to be working, but  
here goes.

I'm running Struts 1.2.9 on Apache Tomcat 5.5.x. One of my JSPs has  
the following section in it.
<ul>
<logic:iterate name="accountInformationForm" property="accounts"  
id="accountSummaryView">
	<li>
	 <html:link
            page="/getaccountdetail.do"
            paramId="id"
            paramName="accountSummaryView"
            paramProperty="accountId">
            <bean:write name="accountSummaryView"  
property="accountType"/>
          </html:link>
         </li>
</logic:iterate>
</ul>

I have verified that the action that loads this JSP has a form called  
accountInformationForm associated with it and the JSP actually  
renders fine, correctly iterating through the collection and printing  
out a link to each account.

Strangely, I get the following error in my Tomcat console though:

Nov 13, 2006 6:15:14 PM org.apache.catalina.core.StandardWrapperValve  
invoke
SEVERE: Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Cannot find bean:  
"accountInformationForm" in any scope
	at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935)
	at org.apache.struts.taglib.logic.IterateTag.doStartTag 
(IterateTag.java:232)
	at org.apache.jsp.account_005finformation_jsp._jspService 
(account_005finformation_jsp.java:211)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.jasper.servlet.JspServletWrapper.service 
(JspServletWrapper.java:332)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile 
(JspServlet.java:314)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

When I comment out the section the console error goes away, so I'm  
sure that's where its coming from. I'm also sure that page is  
functioning 100% correctly.

Any thoughts on why I might be getting this seemingly incorrect error  
message in the console and not in the application?

Bradley



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Console error message for a working tag

Posted by Bradley Wagner <br...@hannonhill.com>.
> Hi,
> I think u have to set the scope to session ...just try it... and  
> let us
> know..
> Regards,
> Mano

Yes, for some reason, when I change the scope of the action mapping  
to "session" the message in the console goes away. I don't understand  
at all. Why it the JSP function correctly in both cases, but in one  
case display an erroneous error message only in the console?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Console error message for a working tag

Posted by Mano Chinthaka Dasanayaka <ma...@mubasher.net>.
Hi, 

U can enclose <logic:present > </logic:present> tag before coming into
iterate tag and test it..

Regards,
Mano

-----Original Message-----
From: Mano Chinthaka Dasanayaka [mailto:mano@mubasher.net] 
Sent: Tuesday, November 14, 2006 11:55 AM
To: 'Struts Users Mailing List'
Subject: RE: Console error message for a working <logic:iterate> tag

Hi,
I think u have to set the scope to session ...just try it... and let us
know..
Regards,
Mano

-----Original Message-----
From: Bradley Wagner [mailto:bradley.wagner@hannonhill.com] 
Sent: Tuesday, November 14, 2006 10:11 AM
To: Struts Users Mailing List
Subject: Re: Console error message for a working <logic:iterate> tag

> Do you think this something to do with the session using  
> scope="request"?

Blah, I can't talk. Do you think this has anything to do with the  
action mapping using a scope="request"?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Console error message for a working tag

Posted by Mano Chinthaka Dasanayaka <ma...@mubasher.net>.
Hi,
I think u have to set the scope to session ...just try it... and let us
know..
Regards,
Mano

-----Original Message-----
From: Bradley Wagner [mailto:bradley.wagner@hannonhill.com] 
Sent: Tuesday, November 14, 2006 10:11 AM
To: Struts Users Mailing List
Subject: Re: Console error message for a working <logic:iterate> tag

> Do you think this something to do with the session using  
> scope="request"?

Blah, I can't talk. Do you think this has anything to do with the  
action mapping using a scope="request"?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Console error message for a working tag

Posted by Bradley Wagner <br...@hannonhill.com>.
> Do you think this something to do with the session using  
> scope="request"?

Blah, I can't talk. Do you think this has anything to do with the  
action mapping using a scope="request"?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Console error message for a working tag

Posted by Bradley Wagner <br...@hannonhill.com>.
> Hi Brad,
>    Double check your Struts-config whether u have set the  
> scope="session"
> for this action. And also try using simple Bean writes before using
> <html:link> For link creations...
>
> Regards,
> Mano

The struts config file uses scope="request" for this action. I tried  
adding a <bean:write> before the <html:link> and it worked fine,  
however, i'm still getting the error only in the console saying that  
it cannot find the bean in any scope. Do you think this something to  
do with the session using scope="request"?

Bradley


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Console error message for a working tag

Posted by Mano Chinthaka Dasanayaka <ma...@mubasher.net>.
Hi Brad,
   Double check your Struts-config whether u have set the scope="session"
for this action. And also try using simple Bean writes before using
<html:link> For link creations...

Regards,
Mano


-----Original Message-----
From: Bradley Wagner [mailto:bradley.wagner@hannonhill.com] 
Sent: Tuesday, November 14, 2006 5:06 AM
To: user@struts.apache.org
Subject: Console error message for a working <logic:iterate> tag

I'm not too worried about this because it seems to be working, but  
here goes.

I'm running Struts 1.2.9 on Apache Tomcat 5.5.x. One of my JSPs has  
the following section in it.
<ul>
<logic:iterate name="accountInformationForm" property="accounts"  
id="accountSummaryView">
	<li>
	 <html:link
            page="/getaccountdetail.do"
            paramId="id"
            paramName="accountSummaryView"
            paramProperty="accountId">
            <bean:write name="accountSummaryView"  
property="accountType"/>
          </html:link>
         </li>
</logic:iterate>
</ul>

I have verified that the action that loads this JSP has a form called  
accountInformationForm associated with it and the JSP actually  
renders fine, correctly iterating through the collection and printing  
out a link to each account.

Strangely, I get the following error in my Tomcat console though:

Nov 13, 2006 6:15:14 PM org.apache.catalina.core.StandardWrapperValve  
invoke
SEVERE: Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Cannot find bean:  
"accountInformationForm" in any scope
	at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935)
	at org.apache.struts.taglib.logic.IterateTag.doStartTag 
(IterateTag.java:232)
	at org.apache.jsp.account_005finformation_jsp._jspService 
(account_005finformation_jsp.java:211)
	at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.jasper.servlet.JspServletWrapper.service 
(JspServletWrapper.java:332)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile 
(JspServlet.java:314)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

When I comment out the section the console error goes away, so I'm  
sure that's where its coming from. I'm also sure that page is  
functioning 100% correctly.

Any thoughts on why I might be getting this seemingly incorrect error  
message in the console and not in the application?

Bradley



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org