This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a string like "aaabbbccc". I want to print that as :
on to the web page.
When I use the following code. I see it get printed as "aaabbb " and when I view the source,
I see it as "aaa</br>bbb". How can print them with breaks.
First: your HTML syntax is invalid. Write valid HTML.
Second: the c:out by default escapes XML/HTML. Leave it away or set its escapeXml attribute to false.
Third: using scriptlets is a bad practice, use taglibs/EL only.