title: Tomcat Error: Content is not allowed in prolog
body: <p>Tomcat reports xml error and I've spent hours trying to fix this with no luck. It says line 1 column 1 and they all are correct according to me. Any suggestion on how to fix this? I've tried <code>atlassian-xml-cleaner-0.1.jar</code> to create a new file out of the old one and still I get the same error.</p>
  
  <p>I have another server (production) where I have the same files and it seems to be working fine there, though I did not try a restart. I copied the xml from that production server into this host and still get the error.</p>
  
  <p>Here is the line 1 from all the 4 xml's.</p>
  
  <p>context.xml</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  </code></pre>
  
  <p>server.xml</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  </code></pre>
  
  <p>tomcat-users.xml</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  </code></pre>
  
  <p>web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
  </code></pre>
  
  <p>ERROR in the logs:</p>
  
  <pre><code>Feb 29, 2020 5:36:48 AM org.apache.tomcat.util.digester.Digester fatalError
  SEVERE: Parse Fatal Error at line 1 column 1: Content is not allowed in prolog.
  org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
          at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:994)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
          at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
          at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
          at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1576)
          at org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:565)
          at org.apache.catalina.startup.TldConfig.tldScanWebXml(TldConfig.java:357)
          at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:262)
          at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:590)
          at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
          at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5566)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1702)
          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1692)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at java.lang.Thread.run(Thread.java:748)
  </code></pre>