How to display text (with line breaks) from a record

Dear all.

I am sure this is a stupid question but i am new to JSP.

What i am trying to do is to display some a record in page. This records is some text with line breaks like:

lorem ipsumt kksjkjksjdkfjksjdf.

sdfsdfkjkjkjskdjksf

When i display it using:

<%=(((rs_us_data = rs_us.getObject("text"))==null || rs_us.wasNull())?"":rs_us_data)%>

I just see lorem ipsumt kksjkjksjdkfjksjdf. sdfsdfkjkjkjskdjksf with no line breaks. I know in ASP i did a replace to recognize the br tag but i don't know how to solve it with JSP.

Thanks so much for your help

[615 byte] By [c_vivasa] at [2007-11-26 16:16:34]
# 1
You could wrap the text in HTML pre tags or display it in a HTML textarea
tolmanka at 2007-7-8 22:39:41 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Could you give more details? Users enter text directly in a form text field (just in case this help)
c_vivasa at 2007-7-8 22:39:41 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Come on, you only need a tiny bit more details. You have this:<%=(((rs_us_data = rs_us.getObject("text"))==null || rs_us.wasNull())?"":rs_us_data)%>When somebody says "Wrap that in pre tags" then you do this:<pre><%=(((rs_us_data = rs_us.getObject("text"))==null || rs_us.wasNull())?"":rs_us_data)%></pre>I will leave it to you to figure out how to get it into an HTML textarea. Really, it's not that hard. You can find that in any HTML textbook or tutorial.

DrClapa at 2007-7-8 22:39:41 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
[nobr]I suggest this:rs_us_data= rs_us_data.replaceAll("\\n", "<br>");[/nobr]
Niklasa at 2007-7-8 22:39:41 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...