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!

Problem using logic:messagesPresent

Status
Not open for further replies.

jsulman

Programmer
Jun 14, 2001
85
US
In a Sturts application I am trying to get my error messages to display at the top of a form. To avoid the <html:errors/> tag I am using the code below.

<logic:messagesPresent>
<span id="errorsHeader">
<bean:message key="errors.validation.header"/>
</span>
<html:messages id="error">
<c:eek:ut value="${error}"/>
</html:messages>
<hr>
<logic:messagesPresent>

This works fine when there are errors present. But when there are none it still displays the "error.validation.header" key. It seems like it sees messages present if there are not any.

Any body see anything wrong.

Thanks in advance

Jeff Sulman
 
I've used <logic:messagesPresent> and it works well. Would that be there are other error messages in the scope that you didn't aware of.

try put <html:errors /> within the <logic:messagesPresent>. This should show you all the error messages.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top