The best approach will be to Use Line seperator obtained by using
System.getProperty("line.separator")
.
If this file will get downloaded than there should be no problem but if this csv is shown on the browser's chrome it self then it is better to change the Content type to
response.setContentType(text/csv;charset=UTF-8")
And if the motto is just to show this on browser then user <BR>
as suggested above.
For me line.seperator
did the magic. Just add this line
String lineSep = System.getProperty("line.separator");
And use this lineSep
in place of '\n'.
Hope this helps.