title: Web.xml Can a <servlet-name> be just a class?
body: <p>I see lots of examples on the web of people doing this like..</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns="http://java.sun.com/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
  http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
       version="3.0"&gt;
  &lt;servlet-mapping&gt;
  &lt;servlet-name&gt;javax.ws.rs.core.Application&lt;/servlet-name&gt;
  &lt;url-pattern&gt;/hello/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>However, that never works for me. I get an error </p>
  
  <pre><code>java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name javax.ws.rs.core.Application
  </code></pre>
  
  <p>So what is the secret to be able to use a class name in a servlet-name directly ??</p>