public function registerServlet(ServletDescriptorInterface $descriptor)
    {

        try {
            // prepend the url-pattern - servlet mapping to the servlet mappings
            foreach ($descriptor->getUrlPatterns() as $pattern) {
                $this->addServletMapping($pattern, $descriptor->getName());
            }

            // register's the servlet's references
            $this->registerReferences($descriptor);

        } catch (\Exception $e) {
            // log the exception
            $this->getApplication()->getInitialContext()->getSystemLogger()->critical($e->__toString());
        }
    }