All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.unidal.test.jetty.WebModuleServlet Maven / Gradle / Ivy

There is a newer version: 4.1.1
Show newest version
package org.unidal.test.jetty;

import java.io.IOException;

import org.mortbay.jetty.servlet.DefaultServlet;
import org.mortbay.resource.Resource;

public class WebModuleServlet extends DefaultServlet {
   private static final long serialVersionUID = 1L;

   private WebModuleResource m_resource;

   public WebModuleServlet(WebModuleResource resource) {
      m_resource = resource;
   }

   @Override
   public Resource getResource(String pathInContext) {
      try {
         return m_resource.addPath(pathInContext);
      } catch (IOException e) {
         // ignore it
      }

      return super.getResource(pathInContext);
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy