Plain text <==> HTML text
843838Nov 3 2005 — edited Nov 4 2005After a user enters text on a textares field, the text is saved into a DB. In order to display the text properly on a web page, a JSP file in my case, the text needs to be converted into a html format text. That is at lease to have the paragraph tag <p> for each paragraph. For example, this forum application does this conversion. You can't directly put the paragraph tag into the text. How to parse the plain text and when to do the parse before saving into DB or after retrieving from DB to display?
I asked this question on the servlet forum and haven't had a right input so far. I guess I didn't post my this question in the right forum. I hope to get a few helpful responses this time.
Thanks in advance for your inputs.
v.