コード例 #1
0
 /**
  * Initializes the servlet with the passed configuration.
  *
  * @param \AppserverIo\Psr\Servlet\ServletConfigInterface $config The configuration to initialize the servlet with
  *
  * @throws \AppserverIo\Psr\Servlet\ServletException Is thrown if the configuration has errors
  * @return void
  */
 public function init(ServletConfigInterface $config)
 {
     parent::init($config);
     $this->webappPath = $this->getServletConfig()->getWebappPath();
 }
コード例 #2
0
 /**
  * Initializes the servlet with the passed configuration.
  *
  * @param \AppserverIo\Psr\Servlet\ServletConfigInterface $config The configuration to initialize the servlet with
  *
  * @return void
  */
 public function init(ServletConfigInterface $config)
 {
     // call parent method
     parent::init($config);
     // load the values from the configuration file
     $this->initConfiguration();
     // initialize the routing
     $this->initRoutes();
 }