Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- snip..
- public void start(BundleContext bundleContext) throws Exception {
- ServiceReference<?> httpServiceReference = bundleContext.getServiceReference(HttpService.class.getName());
- System.out.println("ref: " + httpServiceReference);
- HttpService httpService = (HttpService) context.getService(httpServiceReference);
- System.out.println(httpService.getClass().getName());
- try {
- httpService.registerServlet("testservlet", new MyServlet() , null, null);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement