added support for resourcePath and servlets.