Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

using escape characters(\n,\t and etc) in JSP

843838Oct 31 2005 — edited Nov 3 2005
Hi,

I need to format a jsp UI with out using any html code or CSS.

My end clients are having text based email utilities which does not support html or CSS. So I am generating a email template based on JSP by using session data for dynamic values.

Even though I am using escape char in the jsp it is not printing in new line. All information coming as a string in one shot with out formatting.

Code:

<%
footerContent.append("\r\nYou can visit the Store at");
footerContent.append(Global.getString("Store.Common.NewStoreURL"));
footerContent.append("If you have questions please email us at:"+Store.getContactInfo(GlobalConstants.EMAILADDDRESS)+"\r");
footerContent.append("or phone at "+Store.getContactInfo(GlobalConstants.PHONE));
%>

<%=footerContent.toString()%>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 1 2005
Added on Oct 31 2005
4 comments
432 views