tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Smith" <jksm...@email.arizona.edu>
Subject Re: Preserving Line Breaks in <c:out>
Date Wed, 16 Jul 2003 19:00:27 GMT
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" <brian@briandame.org>
To: "'Tag Libraries Users List'" <taglibs-user@jakarta.apache.org>
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: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message