*
The moose likes IDEs, Version Control and other tools and the fly likes Problem creating servlets in Netbeans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Problem creating servlets in Netbeans" Watch "Problem creating servlets in Netbeans" New topic
Author

Problem creating servlets in Netbeans

Alan Blass
Ranch Hand

Joined: Mar 21, 2010
Posts: 119
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

Joined: May 04, 2011
Posts: 144

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.


OCJP6, OCWCD5
Alan Blass
Ranch Hand

Joined: Mar 21, 2010
Posts: 119
Yes, I am trying to create a new Servlet. No, that Servlet class does not already exist in my web.xml.

Please help. Thanks.
 
 
subject: Problem creating servlets in Netbeans
 
Similar Threads
Error with web.xml
EJB injection nullpointer and jsf grammar not found
how to initiate hashtable and linklist
struts1
Calling a managed bean method from JSF