Subversion Repositories general

Rev

Rev 1248 | Rev 1250 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1248 dev 1
package ak.photoalbum.webapp;
2
 
3
import java.io.InputStream;
4
import javax.servlet.ServletContext;
1249 dev 5
import ak.photoalbum.logic.ResourceFactory;
1248 dev 6
 
7
public class ServletResourceFactory
8
  implements ResourceFactory
9
{
10
  private ServletContext servletContext;
11
 
12
  public ServletResourceFactory(ServletContext servletContext)
13
  {
14
    this.servletContext = servletContext;
15
  }
16
 
17
  public InputStream getAsStream(String path)
18
  {
19
    return servletContext.getResourceAsStream("/" + path);
20
  }
21
}
22