Don't know what your action tools do, but the code I sent works.  If
you want messages instead of actions, then user the following:


      messages = new ActionMessages();
      messages.add(Globals.MESSAGE_KEY, new
ActionMessage("button.crop.crop_allowed_width","" + width));
      messages.add(Globals.MESSAGE_KEY, new
ActionMessage("button.crop.crop_allowed_height","" + height));
      messages.add(Globals.MESSAGE_KEY, new
ActionMessage("button.crop.crop_allowed_percent_width","" + width));
      messages.add(Globals.MESSAGE_KEY, new
ActionMessage("button.crop.crop_allowed_percent_height","" + height));
      messages.add(Globals.MESSAGE_KEY, new
ActionMessage("button.crop.crop_allowed_percent_width_mix","" +
width));
      messages.add(Globals.MESSAGE_KEY, new
ActionMessage("button.crop.crop_allowed_percent_height_mix","" +
height));
      saveMessages(request, messages);

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]

Reply via email to