I am a Struts newbie, but not in writing web-applications or JSP pages.

I am writing a simple app that is taking data from my database and displaying the data in my JSP page, that works. I got the date formatted how I want, and that's fine. The text data that I want to display has some linefeeds in it within the database. Such as:

Hi!
This is a Test!
This is another line!

When this displays, it displays as one long line because I know HTML doesn't recognize line feeds. So, within my DTO class, when I get my data, I did a replaceAll("\n","<br>") to replace the linefeeds within my text. What happens now is that I see the <br> as part of the text, and the page source shows &gt;br&lt; (which is why I see the <br>).

So, my question is ... how can I keep the line breaks by adding <br/> correctly? I want to keep the formatting the same with these line breaks. Is there some <fmt> or <c> tag that I am missing or some regular expression tag I could use. I am digging into my JSTL tag books for an answer.

And BTW, I did search the Jarkarta Struts documentation, and I did look on the web for an answer first. Leaving a message here was my last resort.

Thanks.

                    Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to