title: Jetty: HTTP ERROR: 503/ Service Unavailable
body: <p>I'm new to Jetty, I tried to run the sample program here "<a href="http://www.codeproject.com/Articles/128145/Run-Jetty-Web-Server-Within-Your-Application" rel="noreferrer">http://www.codeproject.com/Articles/128145/Run-Jetty-Web-Server-Within-Your-Application</a>" 
  but I got error message on my page "<a href="http://localhost:8585/runJetty/" rel="noreferrer">http://localhost:8585/runJetty/</a>"</p>
  
  <pre><code>"HTTP ERROR: 503
  Problem accessing /runJetty/. Reason: 
      Service Unavailable
  --------------------------------------------------------------------------------
  Powered by Jetty:// "
  </code></pre>
  
  <p>Error log I get from eclipse:</p>
  
  <pre><code>2012-04-20 11:14:32.522:INFO:oejs.Server:jetty-8.1.3.v20120416
  2012-04-20 11:14:32.617:WARN:oejx.XmlParser:FATAL@file:/C:/Users/***/workspace/Test/WEB-INF/web.xml line:1 col:7 : org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
  2012-04-20 11:14:32.617:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/runJetty,file:/C:/Users/***/workspace/Test/}
  org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
  at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
  at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
  at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
  at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
  at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPIData(Unknown Source)
  at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanPIData(Unknown Source)
  at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPI(Unknown Source)
  at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
  at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
  at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
  at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
  at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
  at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
  at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
  at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
  at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
  at javax.xml.parsers.SAXParser.parse(Unknown Source)
  at org.eclipse.jetty.xml.XmlParser.parse(XmlParser.java:199)
  at org.eclipse.jetty.xml.XmlParser.parse(XmlParser.java:215)
  at org.eclipse.jetty.webapp.Descriptor.parse(Descriptor.java:60)
  at org.eclipse.jetty.webapp.WebDescriptor.parse(WebDescriptor.java:143)
  at org.eclipse.jetty.webapp.MetaData.setWebXml(MetaData.java:165)
  at org.eclipse.jetty.webapp.WebXmlConfiguration.preConfigure(WebXmlConfiguration.java:55)
  at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:417)
  at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:453)
  at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
  at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224)
  at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:167)
  at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
  at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
  at org.eclipse.jetty.server.Server.doStart(Server.java:262)
  at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
  at blog.runjetty.server.JettyServer.start(JettyServer.java:22)
  at blog.runjetty.ui.listener.ServerStartStopActionListner.actionPerformed(ServerStartStopActionListner.java:38)
  at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
  at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
  at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
  at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
  at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
  at java.awt.Component.processMouseEvent(Unknown Source)
  at javax.swing.JComponent.processMouseEvent(Unknown Source)
  at java.awt.Component.processEvent(Unknown Source)
  at java.awt.Container.processEvent(Unknown Source)
  at java.awt.Component.dispatchEventImpl(Unknown Source)
  at java.awt.Container.dispatchEventImpl(Unknown Source)
  at java.awt.Component.dispatchEvent(Unknown Source)
  at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
  at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
  at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
  at java.awt.Container.dispatchEventImpl(Unknown Source)
  at java.awt.Window.dispatchEventImpl(Unknown Source)
  at java.awt.Component.dispatchEvent(Unknown Source)
  at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
  at java.awt.EventQueue.access$000(Unknown Source)
  at java.awt.EventQueue$1.run(Unknown Source)
  at java.awt.EventQueue$1.run(Unknown Source)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
  at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
  at java.awt.EventQueue$2.run(Unknown Source)
  at java.awt.EventQueue$2.run(Unknown Source)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
  at java.awt.EventQueue.dispatchEvent(Unknown Source)
  at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
  at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
  at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
  at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
  at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
  at java.awt.EventDispatchThread.run(Unknown Source)
  2012-04-20 11:14:32.648:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8585
  </code></pre>
  
  <p>My xml file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" 
  version="2.4"&gt;
      &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;page/index.jsp&lt;/welcome-file&gt; 
      &lt;/welcome-file-list&gt;
  &lt;/web-app&gt; 
  </code></pre>
  
  <p>My JSP file</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1 pageEncoding="ISO-8859-1"%&gt; 
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01     Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt; 
      &lt;head&gt; 
          &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
          &lt;title&gt;Embedding Jetty&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;h2&gt;Running Jetty web server from our application!!&lt;/h2&gt;
      &lt;/body&gt;
  &lt;/html&gt;  
  </code></pre>