Reputation: 17269
Im using Eclipse and AppEngine SDK 1.7.5.
I tried to validate war folder in my Google App Engine project. There is Invalid Content with my web.xml:
Invalid content was found starting with element 'url-pattern'.
One of '{"http://java.sun.com/xml/ns/javaee":web-resource-name}'
is expected. web.xml /project/war/WEB-INF line 121 XML Problem
This is the xml referred on the error:
<security-constraint>
<web-resource-collection>
<url-pattern>/admin/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
How to fix the error?
Upvotes: 0
Views: 1897
Reputation: 3436
It's a dup, see: Eclipse reporting problem in my web.xml, but it is processed fine
Anyway, try adding a web-resource-name element as follows:
<web-resource-collection>
<web-resource-name>Admin Resources</web-resource-name>
<url-pattern>/admin/*</url-pattern>
</web-resource-collection>
Upvotes: 8