Web.xml - Erro [AJUDA]

8 respostas
R
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 
	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_2_5.xsd">
	
	<welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    
	<servlet>
		<servlet-name>dwr-invoker</servlet-name>
		<servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
	</servlet>
	<servlet-mapping>
		<servlet-name>dwr-invoker</servlet-name>
		<url-pattern>/dwr/*</url-pattern>
	</servlet-mapping>
    
	<context-param>
		<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
		<param-value>config.messages</param-value>
	</context-param>
</web-app>

ta ae meu web.xml.

ta dando essse erro:
Severity and Description	Path	Resource	Location	Creation Time	Id
cvc-id.3: A field of identity constraint 'web-app-servlet-name-uniqueness' matched element 'web-app', but this element does not have a simple type.	agenda2/web/WEB-INF	web.xml	line 13	1207330459084	45364

na linha 13

o que esta errado?

8 Respostas

O

rollei:
<web-app version="2.5" 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_2_5.xsd">

isso aqui tá errado. no mínimo faltam aspas. Acho que seria assim:

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
R

as aspas tao ali. uma antes do http e outra depois do .xsd

tentei colocar desse jeito que voce falou mas deu erro.

Severity and Description Path Resource Location Creation Time Id
cvc-elt.1: Cannot find the declaration of element ‘web-app’. agenda2/web/WEB-INF web.xml line 4 1207335337446 45413

R

ninguem?

L

veja o arquivo em anexo!!! e compare com o seu veja onde errou, as vezes é " " e isso torra o juizo do cara quando nao acha eheh!!

flw!

R

a versao desse web que tu me mandou eh 2.4 tem algum exemplo usando o cabecalho com veresao 2.5?

L

2.5

R

<?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

ta usando a xsd 2.4

http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd no web.xml que tu me passou

eu queria um exemplo usando essa:
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd

[]'s

L

opa foi mal!!! veja os exemplos em anexo… cap 7 do livro da kathy!

Criado 4 de abril de 2008
Ultima resposta 7 de abr. de 2008
Respostas 8
Participantes 3