Glassfish Deployment Suddenly Fails From NetBeans
Back to current version Restore this version

If you are running NetBeans v6.1 or about, you may suddenly get this problem. This is caused by NetBeans inserting two things into your web.xml file. Simply remove/comment them out, and you'll be back in business.

The first one is

<servlet>
    <servlet-name>ServletAdaptor</servlet-name>
    <servlet-class>com.sun.ws.rest.impl.container.servlet.ServletAdaptor</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>

and the other is

<servlet-mapping>
    <servlet-name>ServletAdaptor</servlet-name>
    <url-pattern>/resources/*</url-pattern>
</servlet-mapping>

IDE - Java - Networking