erro no arquivo web.xml

HTML

MySQL

Java

05/12/2016

MENSAGEM DE ERRO:
2016-11-02 14:01:49,748 [localhost-startStop-1] ERROR org.apache.tomcat.util.digester.Digester- Parse Fatal Error at line 2 column 193: Attribute "xmlns" was already specified for element "web-app".
org.xml.sax.SAXParseException; systemId: jndi:/localhost/aikachibihistory/WEB-INF/web.xml; lineNumber: 2; columnNumber: 193; Attribute "xmlns" was already specified for element "web-app".


ARQUIVO:
<?xml version="1.0" encoding="UTF-8"?>
  <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 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">
      <display-name>leilao.aika.primefaces</display-name>
      <servlet>
          <servlet-name>Faces Servlet</servlet-name>
          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
          <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
          <servlet-name>Faces Servlet</servlet-name>
          <url-pattern>*.xhtml</url-pattern>
      </servlet-mapping>
      <welcome-file-list>
          <welcome-file>/index.xhtml</welcome-file>
      </welcome-file-list>
      <error-page>
          <exception-type>javax.faces.application.ViewExpiredException</exception-type>
          <location>/index.xhtml</location>
      </error-page>
  </web-app>
Michael Batista

Michael Batista

Curtidas 0

Melhor post

Marcio Souza

Marcio Souza

14/12/2016

Esse web-app está misturando a versão 2.5 com a 3.0. Deve ser uma ou outra. Um exemplo da versão 3.0
<?xml version="1.0" encoding="UTF-8"?>
<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_3_0.xsd" metadata-complete="false" version="3.0"/>
<display-name>leilao.aika.primefaces</display-name>
      <servlet>
          <servlet-name>Faces Servlet</servlet-name>
          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
          <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
          <servlet-name>Faces Servlet</servlet-name>
          <url-pattern>*.xhtml</url-pattern>
      </servlet-mapping>
      <welcome-file-list>
          <welcome-file>/index.xhtml</welcome-file>
      </welcome-file-list>
      <error-page>
          <exception-type>javax.faces.application.ViewExpiredException</exception-type>
          <location>/index.xhtml</location>
      </error-page>
</web-app>
GOSTEI 1
POSTAR