Silly question.
I wrote a servlet that gets init params from the web.xml and stuffs them
into the request which is the displayed by JSP.

But when I try to make it a string with newline characters it still prints
everything in one line - like newline characters turn into regular space
characters.

This is the code:

String newline = System.getProperty("line.separator");

String rName = getServletConfig().getInitParameter("rName");

String kName = getServletConfig().getInitParameter("kName");

result += "Family Members" + newline;

result += rName + newline;

result += kName + newline;


I tried "\n", and '\n' as well.


Thanks.

Reply via email to