I have a servlet file called GetArea.java in /Source Packages/com/companyname/template/ and when I do a Clean and Build in Netbeans, this file is compiled into .class file in the \build\web\WEB-INF\classes\com\companyname\template directory. I have checked it and it is in the directory and the capitalization is correct.

But when I do a RUN, SHIFT-F6, this file gets deleted by Netbeans and it is no longer in the directory. I get an exception: javax.servlet.ServletException: Wrapper cannot find servlet class com.companyname.template.GetArea or a class it depends on.

root cause: java.lang.ClassNotFoundException: com.companyname.template.GetArea.

My web.xml file is:

Java Code:
<servlet>
        <servlet-name>GetArea</servlet-name>
        <servlet-class>com.companyname.template.GetArea</servlet-class>
</servlet>
<servlet-mapping>
        <servlet-name>GetArea</servlet-name>
        <url-pattern>/GetArea</url-pattern>
</servlet-mapping>
Can someone help? Thanks.