This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am using netbeans to create a servlet. I right click on a package, ->New -> Servlet. Then a popup window appears to prompt me for the Class Name. At the bottom of the popup, it says in red: Invalid deployment descriptor web.xml.
When I open my web.xml, it says: Fatal errors were found in web.xml file. It is highly recommended that you fix the errors in XML view (XML tab) as soons as possible. Try to validate the XML document to see the problem.
I ran validate and I got:
XML validation started.
Referenced entity at "nbres:/org/netbeans/modules/j2ee/ddloaders/catalog/resources/XMLSchema.dtd".
Referenced entity at "nbres:/org/netbeans/modules/j2ee/ddloaders/catalog/resources/datatypes.dtd".
XML validation finished.
Is the error only coming up new you are trying to create a new Servlet. Does that Servlet class already exist in your web.xml? You can try debugging by commenting different sections of the web.xml until you found the error goes away.
Joined: Mar 21, 2010
Yes, I am trying to create a new Servlet. No, that Servlet class does not already exist in my web.xml.