how to print break line in jsp.

in jsp where a bean.getProperty() value has a broken line. but it displays as a single line in the web page. when printing the line by System.out.println() statement, it displays as a verious new line where '\0' is applied but in jspbean.getProperty it does not.

For example :

It displays by SOP()statement as

Successful

No error

No restarts

No marked completed

but in web page it displays as

Successful No error No restarts No marked completed.

please provide the code that support in jsp file so that the output statement should like as SOP()statement output type.

Thanks in advance.

Uttam

[674 byte] By [ukbasaka] at [2007-11-27 11:04:20]
# 1

I guess you want to display CRLF (\r\n) in JSP?

Line breaks in HTML are generally represented as < br >.

You have 3 options:

1) replace CRLF by < br >.

2) style the line using CSS with 'white-space' set to 'pre'.

3) surround the line with the HTML < pre > tag.

BalusCa at 2007-7-29 12:57:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Hi BalusC,

Thanks a lot. It works.

ukbasaka at 2007-7-29 12:57:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...