/PhotoAlbum/trunk/src/ak/photoalbum/webapp/ServletResourceFactory.java/ServletResourceFactory.java |
---|
0,0 → 1,21 |
package ak.photoalbum.webapp; |
import java.io.InputStream; |
import javax.servlet.ServletContext; |
public class ServletResourceFactory |
implements ResourceFactory |
{ |
private ServletContext servletContext; |
public ServletResourceFactory(ServletContext servletContext) |
{ |
this.servletContext = servletContext; |
} |
public InputStream getAsStream(String path) |
{ |
return servletContext.getResourceAsStream("/" + path); |
} |
} |