struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Hegarty <>
Subject RE: ActionMessages won't display
Date Mon, 19 Apr 2004 15:43:44 GMT
Cracked it.
I cut and paste your code snippet in, and confirmed the body of 'messagesPresent' is being
So maybe the message was being output, and it just happened to be a blank string.
This appears to be the case - as soon as I put the correct message into ''
(the default bundle) the message appeared.
I thought struts warned about this, but for some reason that didn't happen in this case.

Thanks again for your help guys.

-----Original Message-----
Sent: 19 April 2004 16:14
Subject: RE: ActionMessages won't display

Sorry for missing that Matt.

The id = 'varName' is the object name which will hold each message in the
messages list as it iterates through.

All you should need is something along the following:

<logic:messagesPresent message="true">
<!-- are there any ActionMessages present? -->
	<html:messages id="message" message="true">
		<c:out value="${message}" /><br />

This will examine the request for an ActionMessages object, then iterate
through it assiging each item to object "message". Then the c:out tag will
output the value of message and add a <br /> as a line break.

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message