title: What is the purpose of CXF servlet
body: <p>I was going through a demo project setup for Restful webservice using Apache CXF, where I happened to come by a piece of code inside web.xml:</p>
  
  <pre><code>    &lt;servlet&gt;
      &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.apache.cxf.transport.servlet.CXFServlet
      &lt;/servlet-class&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/services/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>I did not really understand the use of a servlet class in this web.xml. I googled for <code>org.apache.cxf.transport.servlet.CXFServlet</code> and found:</p>
  
  <blockquote>
    <p>The CXFServlet class, which is defined by Apache CXF, is generated and
    registered to handle incoming requests.</p>
  </blockquote>
  
  <p>Now, I really do not understand what that line means</p>
  
  <ol>
  <li>Does this servlet pose as a front-controller, like in Spring MVC flow? </li>
  <li>What is the actual purpose of using this servlet class?</li>
  <li>How does CXF use Spring to provide XML configuration of services defined in the project?</li>
  <li>Does <code>org.glassfish.jersey.servlet.ServletContainer</code> serve the same purpose in Jersey Implementation as <code>org.apache.cxf.transport.servlet.CXFServlet</code> with Apache CXF?</li>
  </ol>
  
  <p>Help me clarify these questions.</p>