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());
        }
    }
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());
        }
    }
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 ( ) ) ; } }
Register the servlet described by the passed descriptor.

@param \AppserverIo\Psr\Servlet\Description\ServletDescriptorInterface $descriptor The servlet descriptor

@return void
Register the servlet described by the passed descriptor .