title: web.xml illegal value after recent change
body: <p>Eclipse is giving the following error whenever I try to expand the contents of a project in Project Explorer:  </p>
  
  <pre><code>An internal error occurred during: "Loading descriptor for AppName.".
  org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'Container' 
  is not legal. (platform:/resource/AppName/src/main/webapp/WEB-INF/web.xml, 81, 16)  
  </code></pre>
  
  <p>The project is a spring mvc app, and the problem seems to be the syntax of the part of web.xml at which a JavaMail section was recently added.  </p>
  
  <p>The line of code throwing the error is marked in the following code segment:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;resource-ref&gt;
    &lt;description&gt;
      Resource reference to a factory for javax.mail.Session
      instances that may be used for sending electronic mail
      messages, preconfigured to connect to the appropriate
      SMTP server.
    &lt;/description&gt;
    &lt;res-ref-name&gt;
      mail/Session
    &lt;/res-ref-name&gt;
    &lt;res-type&gt;
      javax.mail.Session
    &lt;/res-type&gt;
    &lt;res-auth&gt;
      Container
    &lt;/res-auth&gt; &lt;!-- this line throws the error --&gt;
  &lt;/resource-ref&gt;
  </code></pre>
  
  <p></p>
  
  <p>Here is my <code>web.xml</code>:  </p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"&gt;
    &lt;display-name&gt;AppName&lt;/display-name&gt;
    &lt;description&gt;Description of app.&lt;/description&gt;
    &lt;context-param&gt;
      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;classpath:spring/business-config.xml, classpath:spring/tools-config.xml&lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
    &lt;/listener&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;AppName&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
        &lt;param-value&gt;classpath:spring/mvc-core-config.xml&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;AppName&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;datatablesController&lt;/servlet-name&gt;
      &lt;servlet-class&gt;com.github.dandelion.datatables.extras.servlet2.servlet.DatatablesServlet&lt;/servlet-class&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;datatablesController&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/datatablesController/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;filter&gt;
      &lt;filter-name&gt;httpMethodFilter&lt;/filter-name&gt;
      &lt;filter-class&gt;org.springframework.web.filter.HiddenHttpMethodFilter&lt;/filter-class&gt;
    &lt;/filter&gt;
    &lt;filter-mapping&gt;
      &lt;filter-name&gt;httpMethodFilter&lt;/filter-name&gt;
      &lt;servlet-name&gt;AppName&lt;/servlet-name&gt;
    &lt;/filter-mapping&gt;
    &lt;filter&gt;
      &lt;filter-name&gt;encodingFilter&lt;/filter-name&gt;
      &lt;filter-class&gt;org.springframework.web.filter.CharacterEncodingFilter&lt;/filter-class&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;encoding&lt;/param-name&gt;
        &lt;param-value&gt;UTF-8&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;forceEncoding&lt;/param-name&gt;
        &lt;param-value&gt;true&lt;/param-value&gt;
      &lt;/init-param&gt;
    &lt;/filter&gt;
    &lt;filter-mapping&gt;
      &lt;filter-name&gt;encodingFilter&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
    &lt;/filter-mapping&gt;
    &lt;filter&gt;
      &lt;filter-name&gt;datatablesFilter&lt;/filter-name&gt;
      &lt;filter-class&gt;com.github.dandelion.datatables.extras.servlet2.filter.DatatablesFilter&lt;/filter-class&gt;
    &lt;/filter&gt;
    &lt;filter-mapping&gt;
      &lt;filter-name&gt;datatablesFilter&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
    &lt;/filter-mapping&gt;
    &lt;!-- added the following for JavaMail --&gt;
    &lt;resource-ref&gt;
      &lt;description&gt;
        Resource reference to a factory for javax.mail.Session
        instances that may be used for sending electronic mail
        messages, preconfigured to connect to the appropriate
        SMTP server.
      &lt;/description&gt;
      &lt;res-ref-name&gt;
        mail/Session
      &lt;/res-ref-name&gt;
      &lt;res-type&gt;
        javax.mail.Session
      &lt;/res-type&gt;
      &lt;res-auth&gt;
        Container
      &lt;/res-auth&gt;
    &lt;/resource-ref&gt;
  &lt;/web-app&gt;  
  </code></pre>
  
  <p><strong>How can I resolve this error?</strong></p>