I'm trying to distinguish between ActionErrors and ActionMessages but it's not working: The problem is that when I have an error, it's being displayed twice, as both an error AND a message but my messages are not being displayed at all.
(my pages use <html:errors/> and <logic:messagesPresent> <html:messages id="message" property="<%=ActionMessages.GLOBAL_MESSAGE%>"> <li><bean:write name="message"/></li> </html:messages> </logic:messagesPresent>
Errors are created and saved in ActionErrors Messages are created and saved in ActionMessages
Thanks Kerry- Turns out the problem is addressability to the MessageResources object:
Even though I was including my own MessageResources, in trace I see the code is using another one (I'm using Struts 1.2)...weird - haven't figured it out yet (but I see embedded property files in the struts.jar)- What I did was use one of the canned message types (message.simple) and presto - I now get a message - might be a bug (but at least it works for now)..
thanks for the reply Max
posted 15 years ago
You should set your resource to not return null. So you will know when one is missing. You get a funky message like: