I have a HTML text area in a JSP page. When I continuously press a button and the cursor reaches the line end it automatically goes to the second line.
When I get this text and try to print it inside a <p> tag the line breaks disappears
and the whole text appears in one line, not in separate lines like I entered
any ideas how to correctly print it with the new lines?
If you want wrapping in the textarea to turn into linebreaks (
\n) setwrap="hard", ie:<textarea wrap="hard"></textarea>Source: https://developer.mozilla.org/en/HTML/Element/textarea