Hi there,
I'm wondering if there is any way to add an ActionMessage directly from a
JSP (as opposed to in the action). Is there any tag based solution to this (I'm not using scriptlets) ?
I tried writing a custom tag solution myself e.g. :
[in handler....]
ActionMessage newMessage = new ActionMessage("my.key.here");
ActionMessages messages = (ActionMessages)pageContext.getRequest().getAttribute(Globals.MESSAGE_KEY);
messages.add("message", newMessage);
[...]
This was throwing an exception at messages.add(), not sure if its because I was adding a message with no value, or if it just can't be done from here.
The key value I was adding was not being looked up in the resource file (not sure if this happens on saveMessages in the action class).
Thanks in advance for any help.
John.