I am using servlets in Eclipse and trying to retrieve a result set and want to seperate each of the column retrieved from result set by using tab indentation.I have tried using \t, \n. But it is displaying the output in browser with only one space between the columns, even-though I use any special character.
while (rs.next())
{
out.print(rs.getString(1) + rs.getString(2) + '\t' +rs.getString(3)+'\t'+rs.getString(4)+"<br>");
}
I am using Glassfish server and Eclipse IDE
Tab characters are rendered as a single space in HTML.
You need to put it inside pre formatted text tags
or make HTML table out of it: