"resources" is the directory for property files, XML, etc. that need to be on the classpath, but do not need to be compiled. Move your package structure to - testapp/src/main/java/org/whatever/TestServlet.java and it will compile to classes and package them correctly in the WAR.
Write once, run anywhere, because there's nowhere to hide! - /. A.C.