This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have a JSP where I am trying to display a string that may or may not have new line characters within it ("\n"). I want to display this string in a textarea on my JSP. What I need to do this is to have a method that will replace all new line characters with "\\n" Could someone please give me some help in creating this method? I can not seem to get the output I need?