Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

property attribute of html:messages

Status
Not open for further replies.

shibby1011ph

Programmer
Jan 4, 2004
1
PH
why does the html messages not recognize the property name assigned in the java class? i wanted the actionMessages titled "success" to appear green while the global messages should appear red.

Test.java contains :
ActionMessage actionError = new ActionMessage("success.prompt.actionNoticeAddition");
actionMessages.add("success", actionError);

Test.jsp contains :
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<logic:messagesPresent message="true">
<html:messages id="message" message="true" property="success">
<font color="green"><bean:write name="message"/><br><br></font>
</html:messages>
<html:messages id="message" message="true" property="<%= org.apache.struts.action.ActionMessages.GLOBAL_MESSAGE %>">
<font color="red"><bean:write name="message"/><br><br></font>
</html:messages>
</logic:messagesPresen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top