errors = new ActionMessages();
errors.add(Globals.ERROR_KEY, new
ActionMessage("button.crop.no_letters_except_%"));
errors.add(Globals.ERROR_KEY, new
ActionMessage("button.crop.crop_allowed_width","" + width));
errors.add(Globals.ERROR_KEY, new
ActionMessage("button.crop.crop_allowed_height","" + height));
errors.add(Globals.ERROR_KEY, new
ActionMessage("button.crop.crop_allowed_percent_width","" + width));
errors.add(Globals.ERROR_KEY, new
ActionMessage("button.crop.crop_allowed_percent_height","" + height));
errors.add(Globals.ERROR_KEY, new
ActionMessage("button.crop.crop_allowed_percent_width_mix","" +
width));
errors.add(Globals.ERROR_KEY, new
ActionMessage("button.crop.crop_allowed_percent_height_mix","" +
height));
saveErrors(request, errors);
<table>
<tr>
<td>
<font color='#ff0000'>
<!--==========================================================
ERRORS
===========================================================-->
<logic:messagesPresent>
<ul>
<html:messages id='error'>
<li>
<font size='+3'>
<bean:write name='error'/>
</font>
</li>
</html:messages>
</ul>
</logic:messagesPresent>
</font>
<font color='#00ff00'>
<!--==========================================================
MESSAGES
===========================================================-->
<logic:messagesPresent message='true'>
<ul>
<html:messages id='message' message='true'>
<li>
<font size='+1'>
<bean:write name='message'/>
</font>
</li>
</html:messages>
</ul>
</logic:messagesPresent>
</font>
</td>
</tr>
</table>
On 5/9/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> This is ridiculous. I cannot find what the problem is, it depends on
> the phase of the Moon. I have exactly the same problem as this one:
>
> http://marc.theaimsgroup.com/?l=struts-user&m=111348029907000&w=2
>
> Which is, I have the following block:
>
> <logic:messagesPresent>
> <ul>
> <html:messages id="error">
> <li><bean:write name="error"/></li>
> </html:messages>
> </ul>
> </logic:messagesPresent>
>
> which throws javax.servlet.ServletException: Cannot find bean error in any
> scope
>
> If I change it to this one:
>
> <logic:messagesPresent>
> <ul>
> <p>Yes mess</p>
> </ul>
> </logic:messagesPresent>
>
> It shows "Yes mess", which means that messages are present. It works
> sometimes, than it stops and I don't know what did I do that broke it!
> When it breaks, I cannot fix it. I do stupid things like rolling back
> the code until it works, but I could not find where it exactly breaks.
>
> I save messages in my action:
>
> ActionMessages errors =
> ActionTools.getStrutsErrors(wizardManager.getErrors());
> saveErrors(request, errors);
> return mapping.findForward(strMapping);
>
> Using ActionErrors does not help. Mapping is a forward, not a
> redirect. Even if it were redirect, <logic:messagesPresent> should not
> work, but it shows that there are messages present!
>
> I have all the taglibs in place:
>
> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
>
> What the... ? Btw, was like this with 1.2.4, and the same thing with
> 1.3, which I compiled from sources.
>
> Michael.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]