Attributes in web.xml <web application> do not work in Eclipse

I have a multi-module Maven project. It works great on NetBeans. But not in Eclipse (EE Helios SR 1). In the web.xml file, I have the following:

<web-app version="3.0" 
         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"
             metadata-complete="true">

I get 5 xml errors. Each one looks like this:

The version attribute must be declared for the web-app element type

And the part "version"changes to "xmlns:xsi"etc. in other errors. I tried changing the version of the dynamic web module to 3.0, but that did not help.

When moving to Eclipse, I did mvn eclipse:eclipse -Dwtpversion=2.0in the military module and mvn eclipse:eclipsein others. I also installed plugins m2eand m2e-wtp. Thus, I believe that the project should work well with this.

Eclipse , IDE? <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> JSP, , uri NetBeans.

, - ( ) .

+5
2

2.4.

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app 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">

.

+8

.

. .

0

All Articles