title: JSP: Pass Special Characters in response.setHeader?
body: <p>I am getting stuck in a basic JSP Operation. I want to a new line so i have added \n in the end but it throws me an exception. If i remove <strong>\n</strong> everything works fine</p>
  
  <p><strong>Exception</strong></p>
  
  <pre><code>java.lang.IllegalArgumentException: Invalid LF not followed by whitespace
  </code></pre>
  
  <p><strong>Class File</strong></p>
  
  <pre><code>StringBuilder junitLog = new StringBuilder();
  junitLog.append("The class that is being executed : " + description.getClassName() +"\n");
  junitLog.append("Number of testcases to execute : " + description.testCount()+"\n");
  
      /**
       * @return the junitLog
       */
      public StringBuilder getJunitLog() {
          return junitLog;
      }
  
      /**
       * @param junitLog the junitLog to set
       */
      public void setJunitLog(StringBuilder junitLog) {
          this.junitLog = junitLog;
      }
  </code></pre>
  
  <p><strong>JSP:-</strong></p>
  
  <pre><code>response.setHeader("finalJUNITReport",""+ junitListener.getJunitLog());
  </code></pre>