log("[Noelios Restlet Engine] - The ServerServlet couldn't instantiate the class. Please check that you have to proper access rights to " + NAME_TARGET_CLASS);
log("[Noelios Restlet Engine] - The ServerServlet couldn't instantiate the class. Please check that you have to proper access rights to " + targetClassName);
   public UniformInterface getTarget()   {      if(this.handler != null)      {         return this.handler;      }      else      {         synchronized(ServerServlet.class)         {            // Look in the application context attribute if another servlet already set the target            // First, look in the servlet configuration for the attribute name            String targetAttributeName = getServletConfig().getInitParameter(NAME_TARGET_ATTRIBUTE);            if(targetAttributeName == null)            {               // Then, look in the application context               targetAttributeName = getServletContext().getInitParameter(NAME_TARGET_ATTRIBUTE);            }            if(targetAttributeName != null)            {               // Look up the attribute for a target               this.handler = (UniformInterface)getServletContext().getAttribute(targetAttributeName);               if(this.handler == null)               {                  // Try to instantiate a new target                  // First, look in the servlet configuration for the class name                  String targetClassName = getServletConfig().getInitParameter(NAME_TARGET_CLASS);                  if(targetClassName == null)                  {                     // Then, look in the web application context                     targetClassName = getServletContext().getInitParameter(NAME_TARGET_CLASS);                  }                  if(targetClassName != null)                  {                     try                     {                        // Load the target class using the given class name                        Class targetClass = Class.forName(targetClassName);                        // Create a new instance of the target class                        // and store it for reuse by other ServerServlets.                        this.handler = (UniformInterface)targetClass.newInstance();                        getServletContext().setAttribute(NAME_TARGET_ATTRIBUTE, this.handler);                     }                     catch(ClassNotFoundException e)                     {                        log("[Noelios Restlet Engine] - The ServerServlet couldn't find the class. Please check that your classpath includes " + NAME_TARGET_CLASS);                     }                     catch(InstantiationException e)                     {                        log("[Noelios Restlet Engine] - The ServerServlet couldn't instantiate the class. Please check this class has an empty constructor " + NAME_TARGET_CLASS);                     }                     catch(IllegalAccessException e)                     {                        log("[Noelios Restlet Engine] - The ServerServlet couldn't instantiate the class. Please check that you have to proper access rights to " + NAME_TARGET_CLASS);                     }                  }                  else                  {                     log("[Noelios Restlet Engine] - The ServerServlet couldn't find the class name of the target handler. Please set the initialization parameter called " + NAME_TARGET_CLASS);                  }               }            }            else            {               log("[Noelios Restlet Engine] - The ServerServlet couldn't find the attribute name of the target handler. Please set the initialization parameter called " + NAME_TARGET_ATTRIBUTE);            }         }         return this.handler;      }   }