1 12 13 package org.eclipse.equinox.http.servlet.internal; 14 15 import java.io.IOException ; 16 import java.net.URL ; 17 import javax.servlet.http.HttpServletRequest ; 18 import javax.servlet.http.HttpServletResponse ; 19 import org.osgi.framework.Bundle; 20 import org.osgi.service.http.HttpContext; 21 22 public class DefaultHttpContext implements HttpContext { 23 24 private Bundle bundle; 25 26 public DefaultHttpContext(Bundle bundle) { 27 this.bundle = bundle; 28 } 29 30 public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response) throws IOException { 31 return true; 33 } 34 35 public URL getResource(String name) { 36 return bundle.getResource(name); 37 } 38 39 public String getMimeType(String name) { 40 return null; 41 } 42 } 43 | Popular Tags |