Output from servlet is all one line long????
843841Sep 28 2005 — edited Sep 29 2005Forgive me all if this has been answered before, but i cant find the answer.
I have a servlet which has a string value and is then sending that string out to the browser using the out.println.
The problem is that my string has 4 lines but when it appears in the web browser they are all squashed into one line instead. Hope that all make sense.
some code:
String History = " This is s string with 4 lines for example
line 2
line 3
line 4";
out.println("<td>"+History+"</td>");
The out is only as follows:
"is s string with 4 lines for example line 2 line 3 line 4"