title: Preserve line breaks in HTML,JAVA,Spring
body: <p>i have a web application built with HTML(front-end),java(server-side)
  and i have a textarea when posting some data with line breaks (pressing enter after a word)
  the line breaks are not reserved (the data appears next to each other with no line breaks)
  how to preserve the line breaks ?, note that i am not using the  tag when displaying (have to)</p>
  
  <p>i am using the code server side to convert new lines into br</p>
  
  <pre><code>public String saveLineBreaks(String text) {
          return text.replaceAll("\n", "&lt;br/&gt;");
      }
  </code></pre>
  
  <p>but it doesn't work properly </p>