Pessoal
Mechi bastante com VRaptor 2, e agora to fazendo uns testes com o 3.
Logo de cara, peguei o web.xml da apostila da Caelum e quando jogo no meu eclipse, aponta erro (fica aquele x vermelho), mas funciona normal. Queria ver o que é, porque ver sempre aquele x vermelho fica parecendo q ta com erro na aplicação, ai quando tiver erro realmente, pode passar desapercebido.
Meu web.xml é esse:
<?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" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
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">
<display-name>Teste</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<!-- configura o controlador do VRaptor -->
<filter>
<filter-name>vraptor</filter-name>
<filter-class>br.com.caelum.vraptor.VRaptor</filter-class>
</filter>
<filter-mapping>
<filter-name>vraptor</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
</web-app>
Aparece erro na linha
<display-name>Teste</display-name>
o erro é:
Severity and Description Path Resource Location Creation Time Id
cvc-complex-type.2.4.a: Invalid content was found starting with element ‘display-name’. One of ‘{“http://java.sun.com/xml/ns/javaee”:distributable, “http://java.sun.com/xml/ns/javaee”:context-param, “http://java.sun.com/xml/ns/javaee”:filter, “http://java.sun.com/xml/ns/javaee”:filter-mapping, “http://java.sun.com/xml/ns/javaee”:listener, “http://java.sun.com/xml/ns/javaee”:servlet, “http://java.sun.com/xml/ns/javaee”:servlet-mapping, “http://java.sun.com/xml/ns/javaee”:session-config, “http://java.sun.com/xml/ns/javaee”:mime-mapping, “http://java.sun.com/xml/ns/javaee”:welcome-file-list, “http://java.sun.com/xml/ns/javaee”:error-page, “http://java.sun.com/xml/ns/javaee”:jsp-config, “http://java.sun.com/xml/ns/javaee”:security-constraint, “http://java.sun.com/xml/ns/javaee”:login-config, “http://java.sun.com/xml/ns/javaee”:security-role, “http://java.sun.com/xml/ns/javaee”:message-destination, “http://java.sun.com/xml/ns/javaee”:locale-encoding-mapping-list}’ is expected. GPO/web/WEB-INF web.xml line 7 1264095872111 45049
E na linha
<filter-name>vraptor</filter-name>
o erro é:
Severity and Description Path Resource Location Creation Time Id
cvc-id.3: A field of identity constraint ‘web-app-filter-name-uniqueness’ matched element ‘web-app’, but this element does not have a simple type. GPO/web/WEB-INF web.xml line 20 1264095872112 45050
Desde já agradeço qq ajuda.
Abs