Alguem tem algum artigo como utilizar o ActionMessage do Struts. Nao consigo chamar no jsp.
Minha Action
public class TesteAction extends DispatchAction {
public ActionForward inicio(ActionMapping map, ActionForm actionForm,
HttpServletRequest request, HttpServletResponse response) {
ActionMessages messages = new ActionMessages();
ActionMessage msg = new ActionMessage("deu.certo");
messages.add("deu.certo",msg);
return map.findForward("sucesso");
}
}
Meu JSP
<%@ taglib uri="/tags/struts-bean" prefix=“bean” %>
<%@ taglib uri="/tags/struts-html" prefix=“html” %>
<%@ taglib uri="/tags/struts-logic" prefix=“logic” %>
html:html
<logic:messagesPresent name="deu.certo" message="true">
<html:messages name="deu.certo" id="message" message="true">
<bean:write name="message" />
</html:messages>
</logic:messagesPresent>
<h1>Teste de Mensagens</h1>
aplication.properties
deu.certo=Messagem de Sucesso!