Friday, March 11, 2011

Remove dot infront of actionerror and actionmessage in Struts2

You can see the dot symbol infront of actionError and actionMessages while displaying your result in jsp page.

This is because of placing <s:actionerror />  and <s:actionmessages />  directly into your jsp page.
Actionerror and Actionmessage displays result in un-ordered list format.
Your Error or Message in the following format

1) . Action Error
2) . Action Message

Inorder to remove the dot symbol place the <s:actionerror> and <s:actionmessage> inside <s:if> condition


   


   
div class="errors" and div class="messages" are not mandatory.
Both are css classes.
Dot symbol will get removed and you will get the expected result.

For more java programming click this Link.
Do post your comments