I have a column of datatype 'text' in mysql table. I insert text using a textarea in a jsp page, like:
Hi this is Shashank.
Glad to meet you.
When I retrieve the data, it comes out like 'Hi this is Shashank. Glad to meet you. Bye.' in a single line. Will anybody please guide me how I can maintain the text format that was put into the database and display it in the same format?
All you said was "it comes out like...". You didn't say "When I displayed it in a text area it looked like..." so I'm guessing you didn't display it in a text area. So it would be useful to know what tool you WERE using when you displayed it.
Joined: Oct 30, 2008
You are right.
So far I was trying to display the records from database in a html table. Now I retrieved it in a text area, the format was perfect. So that means the formatted text itself is saved in the database. Do you have any idea if the display is not in a text area, but simply in a paragraph like how to get the formatted text?