| Author |
Error Message Not Displaying on JSP(URGENT)
|
faisal khan
Ranch Hand
Joined: Mar 13, 2002
Posts: 47
|
|
Hello I am using jakarta-struts-1.2.4 and the code is below On JSP i write <logic:messagesPresent property="error"> <html:messages property="error" id="errMsg"> <bean:write name="errMsg"/> </html:messages> </logic:messagesPresent> On ActionClass i write messages = new ActionMessages(); messages.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage("error.INVALIDUID")); this.saveMessages(req,messages); return mapping.findForward("fail");
|
 |
Bhavik Patel
Ranch Hand
Joined: Jul 12, 2004
Posts: 155
|
|
On JSP i write <logic:messagesPresent message="true"> <html:messages id="errMsg"> <bean:write name="errMsg"/> </html:messages> </logic:messagesPresent> On ActionClass i write messages = new ActionMessages(); messages.add("failure",new ActionMessage("error.INVALIDUID")); saveMessages(req,messages); return mapping.findForward("fail"); Let me know if it works or not
|
SCJP 1.4<br />SCWCD 1.4(91%)<br />Working on SCJD -Bodgitt & Scrapper Constructions...<br /> <br />"It takes 43 muscles to frown & 17 to smile but it doen't take any to just sit there with a dumb look on your face .. Keep Smiling "
|
 |
faisal khan
Ranch Hand
Joined: Mar 13, 2002
Posts: 47
|
|
i also try message="true" but i wont work
|
 |
Pranav Sharma
Ranch Hand
Joined: Oct 27, 2003
Posts: 254
|
|
This is how I would do it, (now that ActionError is deprecated) Action: JSP:
|
 |
 |
|
|
subject: Error Message Not Displaying on JSP(URGENT)
|
|
|