Subversion Repositories general

Rev

Rev 1250 | Blame | Compare with Previous | Last modification | View Log | RSS feed

package ak.photoalbum.webapp;

import java.io.InputStream;
import javax.servlet.ServletContext;
import ak.photoalbum.util.ResourceFactory;

public class ServletResourceFactory
  implements ResourceFactory
{
  private final ServletContext servletContext;

  public ServletResourceFactory(ServletContext servletContext)
  {
    this.servletContext = servletContext;
  }

  public InputStream getAsStream(String path)
  {
    return servletContext.getResourceAsStream("/" + path);
  }
}