|
Subject:
|
inserting in Break in jsp
|
|
Posted By:
|
austinf
|
Post Date:
|
9/26/2006 1:05:58 AM
|
hi i have a string as follows in a java bean : this should put \r\n this sentence in \r\n two lines.
when i retrieve this in my jsp it displays as a single line.
i am using JSTL in my jsp, and since the escape sequence are not identified in html i replaced the "\r\n" with "<bR>" but when i see the page it comes as follows: this should put <br> this sentence in <br> two lines. and if u see the source it is like: this should put <br> this sentence in <br> two lines.
i would like to know how to resolve this and also how to replace multiple \r, \n, in any sequence, with a single <BR>
Thanks in advance
|
|
Reply By:
|
panacea
|
Reply Date:
|
10/9/2006 8:53:22 PM
|
Um, are you sure you're doing a String.replace("\r\n", "<br>") ? It seems like you're doing String.replace("\r\n", "<br>") instead. Please confirm that you've tried simply "<br>" and used c:out with source="true".
Jon Emerson http://www.jonemerson.net/
|