I'm not sure what you are doing when you output this error message, so this may not be relevent but I reckon that you could avoid this issue with the use of CSS and properly formatting your HTML. If for example you're trying to get the errors to appear next to an input then take a look at this tutorial: http://articles.sitepoint.com/article/fancy-form-design-css/7
If you are wanting it to appear in a list form (I'm assuming here that you take in a list of error messages) do it in the JSP and certainly not from your messages file:
I have to say though the most simple way is just to style it using some html/css.
Prakash Attur wrote:hi david
then how to show the errors in the list format. i cant use the <li> tag every where i have to show the error message in the jsp file. please tell me the alternate idea you have.
Why not? Or why not create a custom tag to do it?
My point is that embedding things like <br> tags in the resource file is a pain, and explicitly ties the error message to the page layout. The idea behind things like resource files is to separate concerns.
Prakash Mani - Attur
Joined: Oct 08, 2009
oh yes very good idea...thanks David..
subject: How to put carriage return in MessageResource.properties?