Try messages.add(Globals.MESSAGE_KEY,new ActionMessage("invalid.login")); ie use Globals.MESSAGE_KEY instead of ActionMessages.GLOBAL_MESSAGE
-- Yoge, AdventNet, Inc. 925-965-6430 [EMAIL PROTECTED] site24x7.com <http://www.site24x7.com/> On 6/20/07, Aleksandar Matijaca <[EMAIL PROTECTED]> wrote:
Hi there, I am having some really stupid issues -- I am using Struts 1.2, and I have an action that does the following: public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionMessages messages = new ActionMessages(); messages.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage(" invalid.login")); saveMessages(request, messages); return mapping.findForward("failure"); } The relevant JSP section looks like this: <logic:messagesPresent message="true" > <tr> <td colspan="2"><font color="red"><bean:message key="errorTitle" /></font> </td> </tr> <html:messages message="true" id="my_messages" > <tr> <td> </td> <td><font color="red"><bean:write name="my_messages" /></font></td> </tr> </html:messages> </logic:messagesPresent> All resources keys are available etc... When the Action executes, I get the following: 2007-06-20 00:06:52.051::WARN: Nested in javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean my_messages in any scope: javax.servlet.jsp.JspException: Cannot find bean my_messages in any scope at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:934) at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:225) The error appears to be around the <bean:write name="my_messages" /> tag. If I replace the bean:message tag with just a XXXXXX string, the XXXXXX appears, and there are no exceptions... So, WHAT GIVES?? I have tried just about everything at this point, and am getting desperate... Thanks, Alex.
-- --Yoge 91-9840425388