View Full Version : what is new line in <textarea>

02-24-2010, 05:38 PM
1.I type multiline (hiting enter) into html textarea.
2. save as it is, to MYSQL, there it becomes one single line
3. pick it up in java from database, there it looks ok, multiline, in debuger
4. send back to client , again one single line !?

tryed, before sending to client:

s = s.replaceAll("$","</BR>");

but looks it is realy one single line coz </BR> appears only at the end of s.

How to handle that ?

02-24-2010, 06:01 PM
//does not

02-24-2010, 06:11 PM
Are you using java or javascript?

02-24-2010, 06:53 PM
java of course,


works on linux and win, so this is database dependant.

02-25-2010, 02:23 PM
It looks like java has an nl2br method. You may want to look into it.


I couldn't find much documentation on the nl2br method. Also have you tried this?


EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum