Jun 17, 2010

Blank lines in Error messages

For the blank line that is appearing for your action/field messages/errors, this is how you solve it:


  • Update the “.errorMessage” element in mpa.css Change to include the following:

margin-bottom:0px;

  • Change your JSP to hold each of the <s:actionErrors/> <s:actionMessages /> <s:fieldErrors/> in separate rows of your table.

<table cellspacing=“0”>
<tr>
<td>
<s:actionErrors />
</td>
</tr>
<tr>
<td>
<s:actionMessages />
</td>
</tr>
<tr>
<td>
<s:fieldErrors />
</td>
</tr>
</table>

  • Make sure that your table also has attribute “cellspacing=’0’”.

No comments: