Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem creating servlets in Netbeans

 
Alan Blass
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

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.
Checking file:/E:/java/Myproject/branch/3/web/WEB-INF/web.xml...
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.

Can anyone help? Many thanks.

My xml file is (sorry, it is quite long):

 
Mike Zal
Ranch Hand
Posts: 144
Fedora Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Alan Blass
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I am trying to create a new Servlet. No, that Servlet class does not already exist in my web.xml.

Please help. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic