Hi All,
I am creating some action errors / action messages and attempting to save them so I can access them in the
JSP from which posted to the Action. I seem to be able to detect whether the errors are there or not with
<logic:messagesPresent>
but I get an exception with
<bean:write name="message"/>
javax.servlet.jsp.JspException: ServletException in '/jsp/icicle/CandidateForm.jsp': Cannot find bean message in any scope
This is really confusing - I appear to have the same setup on another form that works fine (I did a lot of trial and error to get that to work...)
Code snippets follow...
Many thanks for any pointers.
Andrew
//Makes ActionMessages from a hashmap
errors = com.xx.struts.Utils.actionMessages( cb.validate() );
if ( !errors.isEmpty() )
{
// Save my errors to make them availble upon repost.
//addMessages(servletRequest, errors);
//saveMessages(servletRequest.getSession(), errors);
addErrors(servletRequest, errors);
saveErrors(servletRequest, errors);
return actionMapping.getInputForward();
}
<logic:messagesPresent>
<html:messages id="message">
<li><bean:write name="message"/></li>
</html:messages>
</logic:messagesPresent>