Hi all,
I am writing a struts application module that validates a users existance and report confirmation through messages.
my code for action class is:
**************************************
public ActionForward subscribe(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws Exception {
if(subscriber == null){//checks the availability of subscriber
ActionMessages empMsg = new ActionMessages();
ActionMessage msg = new ActionMessage("subscribe.success");
//subscribe.success is associated with a message in //properties file
empMsg.add("MessageId", msg);
saveMessages(request, empMsg);
return mapping.findForward("success");
} else {
ActionMessages empMsg = new ActionMessages();
ActionMessage msg = new ctionMessage("error.alreadyMember");
empMsg.add("ErrorId", msg);
saveMessages(request, empMsg);
return mapping.findForward("success");
}
}
*****************************
In jsp I am accessing them using Thir Id:
I am not getting these messages in the result
I am using sitemesh to decorate my pages
Can any one please tell me where am I going wrong.
Thanks in Advanse.