final HttpService httpService = (HttpService) context.getService(reference);
try {
HttpContext commonContext = new BundleEntryHttpContext(context.getBundle(), "/web");
httpService.registerResources("/struts-examples", "/", commonContext); //$NON-NLS-1$ //$NON-NLS-2$
Servlet adaptedJspServlet = new ContextPathServletAdaptor(new JspServlet(context.getBundle(), "/web"), "/struts-examples"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
httpService.registerServlet("/struts-examples/*.jsp", adaptedJspServlet, null, commonContext); //$NON-NLS-1$
Dictionary initparams = new Hashtable();
initparams.put("servlet-name", "action"); //Note: requires servlet-name support in Http Service Implementation
initparams.put("config", "/WEB-INF/struts-config.xml");