When I did this, I used option #1. I kind of extended a controller tag I had already built to do the work of replacing the "\n"s with "<br />"s and so on.
James Smith Application Systems Analyst, Treistman Center College of Fine Arts, University of Arizona ----- Original Message ----- From: "Brian Dame" <[EMAIL PROTECTED]> To: "'Tag Libraries Users List'" <[EMAIL PROTECTED]> Sent: Wednesday, July 16, 2003 11:52 AM Subject: Preserving Line Breaks in <c:out> > Does anyone have tips on preserving line breaks in <c:out>? > > For example, a user enters text into a textarea, which is stored in a > database. When I retrieve the text from the database, I'd like to > display it formatted exactly as the user entered it. > > I can only think of two options: > > 1) Parse the text, insert <p> and <br> tags as needed, and set > escapeXml=false on the <c:out> tag > > 2) Hardwrap the text and use a <pre> tag or CSS equivalent around it. > > Anyone have other ideas? > > Thanks, > > Brian > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]