Skip to content

Instantly share code, notes, and snippets.

@lamngockhuong
Last active December 30, 2017 16:14
Show Gist options
  • Save lamngockhuong/5f33a6bb732e3f86ccd1e3be24da0198 to your computer and use it in GitHub Desktop.
Save lamngockhuong/5f33a6bb732e3f86ccd1e3be24da0198 to your computer and use it in GitHub Desktop.
[Struts 1: Show messages and errors in jsp] #java #struts
<html:messages property="NameMessages"/>
or
<logic:messagesPresent message="true">
<html:messages id="aMsg" message="true">
<logic:present name="aMsg">
<!-- Messages -->
<div class="action-message info">
<p class="text"><bean:write name="aMsg" filter="false" /></p>
</div>
</logic:present>
</html:messages>
</logic:messagesPresent>
================
<html:errors property="NameError"/>
or
<logic:messagesPresent message="false">
<html:messages id="aMsg" message="false">
<logic:present name="aMsg">
<!-- Warnings-->
<div class="action-message failure">
<p class="text"><bean:write name="aMsg" filter="false" /></p>
</div>
</logic:present>
</html:messages>
</logic:messagesPresent>
-----------
Lâm Ngọc Khương
http://ngockhuong.com
http://codekhongkho.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment