title: Output a file to html using Netbeans
body: <p>I am trying to output an html file that used to be a .txt file. I had to format the .txt file into html using regex. I tried doing what user Krige did on here: <a href="https://stackoverflow.com/questions/5936003/write-html-file-using-java">Write HTML file using Java</a>
  I'm still a beginner, how do I write the newly made .html file to the $body - and then display it?</p>
  
  <pre><code>File htmlTemplateFile = new File("path/template.html");
  String htmlString = FileUtils.readFileToString(htmlTemplateFile);
  String title = "New Page";
  String file = "Shakespeare.html" 
  htmlString = htmlString.replace("$body", file);
  File newHtmlFile = new File("path/new.html");
  FileUtils.writeStringToFile(newHtmlFile, htmlString);
  </code></pre>