This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The source file indicated in the URL shows error badges when opened in the IDE (build tree then open parent w/ required projects), but compiles cleanly with Maven 2.2.1 or 3.0-beta-1. (Neighboring MockRequest is similar.) The project POM says <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.3</version> <scope>provided</scope> </dependency> and the parent POM has <dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty</artifactId> <version>6.1.11</version> <scope>test</scope> </dependency> which indirectly includes org.mortbay.jetty:servlet-api-2.5:6.1.11:jar. Maven seems to give precedence to the 2.3 Servlet API in provided scope, thus permitting MockServletContext to implement ServletContext. But NB seems to give precedence to the 2.5 API inherited from Jetty, so the NB editor complains that getContextPath() is unimplemented. Workaround is to add <exclusions> <exclusion> <artifactId>servlet-api-2.5</artifactId> <groupId>org.mortbay.jetty</groupId> </exclusion> </exclusions> to the parent POM and restart the IDE after deleting $userdir/var/cache/index.
Seems fixed by M3 embedder. *** This bug has been marked as a duplicate of bug 188871 ***