I'm using Google App Engine with the Google plugin in Eclipse, here is the header of my web.xml:
<?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" version="2.5">
Based on some of the GAE documentation, I added this:
<security-constraint>
<web-resource-collection>
<url-pattern>/tasks/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
However Eclipse reports an error at "url-pattern":
cvc-complex-type.2.4.a: Invalid content was found starting with element 'url-pattern'.
One of '{"http://java.sun.com/xml/ns/javaee":web-resource-name}' is expected.
I can start the app and it seems to process the web.xml file just fine, but I don't like the fact that Eclipse is reporting an error. What is the problem?
well, the error seems pretty straightforward - a web-resource-name tag it expected before the url-pattern :)
cheers
Just to add exact code
As @peshkira says, the problem is a missing parameter. But since the web.xml file is generated by Google tools, I thought there might be something wrong with the Google tools that were generating the files.
For my part, I was following https://developers.google.com/appengine/docs/java/dataprocessing/mapreduce_config#the_webxml_file to try out Google Modules (https://developers.google.com/appengine/docs/java/modules/) and the Web Tools Platform (WTP) (https://developers.google.com/appengine/docs/java/webtoolsplatform) for Eclipse.
So I filed a support ticket with Google Cloud Support and here is the answer they provided: