You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by lixin chu <li...@yahoo.com> on 2004/09/07 09:34:07 UTC

Help ---- Error: can not find bean messages in any scope

Hi,
I got this error log 
~~~~~~~~~~~~~~~~~~~~~~~~~~
07.09.04 15:21:34 [http8080-Processor24] ERROR
org.apache.struts.taglib.tiles.InsertTag -
ServletException in '/WEB-INF/tiles/home.jsp': Cannot
find bean messages in any scope
javax.servlet.ServletException: Cannot find bean
messages in any scope
......
~~~~~~~~~~~~~~~~~~~~~~~~~~

Here is part of the home.jsp file:
----------------------------------
<b>Define a Template</b>
<font color="red" size=2>
<logic:messagesPresent>
<ul>
<html:messages id="error">
<li><bean:write name="error"/></li>
</html:messages><br>
</ul>
</logic:messagesPresent>
</font>

<font color="blue" size=2>
<logic:messagesPresent message="true">
<ul>
<html:messages id="messages" message="true">
<li><bean:write name="messages"/></li>
</html:messages><br>
</ul>
</logic:messagesPresent>
</font>
......
-------------------------------------------

In the Action class, I have these:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ActionMessages messages = getMessages(request);
messages.add(ActionMessages.GLOBAL_MESSAGE, new
ActionMessage ("Org convert error"));
saveMessages (request, messages);
....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
the above code is called only when there is some
error. 

what's wrong ?

thanks
li xin



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: Help ---- Error: can not find bean messages in any scope

Posted by Martin Gainty <mg...@hotmail.com>.
Lixin:

Where are your taglib descriptors ?

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

HTH,

Martin-

----- Original Message ----- 
From: "lixin chu" <li...@yahoo.com>
To: <st...@jakarta.apache.org>
Sent: Tuesday, September 07, 2004 3:34 AM
Subject: Help ---- Error: can not find bean messages in any scope


> Hi,
> I got this error log 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~
> 07.09.04 15:21:34 [http8080-Processor24] ERROR
> org.apache.struts.taglib.tiles.InsertTag -
> ServletException in '/WEB-INF/tiles/home.jsp': Cannot
> find bean messages in any scope
> javax.servlet.ServletException: Cannot find bean
> messages in any scope
> ......
> ~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Here is part of the home.jsp file:
> ----------------------------------
> <b>Define a Template</b>
> <font color="red" size=2>
> <logic:messagesPresent>
> <ul>
> <html:messages id="error">
> <li><bean:write name="error"/></li>
> </html:messages><br>
> </ul>
> </logic:messagesPresent>
> </font>
> 
> <font color="blue" size=2>
> <logic:messagesPresent message="true">
> <ul>
> <html:messages id="messages" message="true">
> <li><bean:write name="messages"/></li>
> </html:messages><br>
> </ul>
> </logic:messagesPresent>
> </font>
> ......
> -------------------------------------------
> 
> In the Action class, I have these:
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ActionMessages messages = getMessages(request);
> messages.add(ActionMessages.GLOBAL_MESSAGE, new
> ActionMessage ("Org convert error"));
> saveMessages (request, messages);
> ....
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> the above code is called only when there is some
> error. 
> 
> what's wrong ?
> 
> thanks
> li xin
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> 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