Example #1
0
 /**
  * Initializes the servlet with the passed configuration.
  *
  * @param \AppserverIo\Psr\Servlet\ServletConfigInterface $servletConfig The configuration to initialize the servlet with
  *
  * @return void
  */
 public function init(ServletConfigInterface $servletConfig)
 {
     // pre-initialize the X-POWERED-BY header
     $this->poweredBy = get_class($this);
     // pre-initialize the path to the web application
     $this->webappPath = $servletConfig->getWebappPath();
 }
Example #2
0
 /**
  * Initializes the servlet with the passed configuration.
  *
  * @param \AppserverIo\Psr\Servlet\ServletConfigInterface $servletConfig The configuration to initialize the servlet with
  *
  * @return void
  */
 public function init(ServletConfigInterface $servletConfig)
 {
     // pre-initialize the X-POWERED-BY header
     $this->poweredBy = get_class($this);
     // pre-initialize the possible DHTML template paths
     $this->webappPath = $servletConfig->getWebappPath();
     $this->appBase = $servletConfig->getServletContext()->getAppBase();
     $this->baseDirectory = $servletConfig->getServletContext()->getBaseDirectory();
 }