Hi, I have a text in Oracle DB separated to new lines.
I would like to write it in the bead:write with the lines separated as in HTML. So I added a method in the bean propert: public String getBody() { String convertedBody = IOTextUtil.convertPlainTextToHTML(body); return convertedBody; } Where IOTextUtil. convertPlainTextToHTML method is: public static String convertPlainTextToHTML(String body) { // First replace double \n's with "\n<P>" Regex html1Replacer = new Regex("\n\n", "\n<P>"); String strPreOutput1 = html1Replacer.replaceAll(body); // Next replace single \n with <BR> (find "\n" NOT followed by // the code <P> (which we just put in). We shouldn't need to worry // about double \n's at this point - they should have been converted // by the previous replace action Regex html2Replacer = new Regex("\n(?!<P>)", "<BR />"); return html2Replacer.replaceAll(strPreOutput1); } But struts print it with <br /> instead of breading it into new lines!!! Where is the place to convert it to new lines? Or how do I do it? Thanks Odelya --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]