Try

If this is going to be displayed by a browser then try:

String newline = "<br>";

-Tim

Mighty Tornado wrote:
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.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to