Questions about contexts [message #90173] |
Mon, 11 June 2007 21:19 |
Eclipse User |
|
|
|
Originally posted by: roide.gmx.de
Hi @all,
I'm trying to get a small sample web app running based on jetty embedded in equinox.
My webcontent is distributed in several bundles.
Each bundle registers it resources via a service like this:
HttpContext commonContext = new BundleEntryHttpContext(tempBundle);
httpService.registerResources(service.getResourceAlias(), service.getPathToResources(), commonContext);
Servlet adaptedJspServlet = new ContextPathServletAdaptor(new JspServlet(service.getContext().getBundle(), service.getPathToServlets()), service.getServletContextPath());
httpService.registerServlet(service.getServletAlias(), adaptedJspServlet, null, commonContext);
This solution is working fine. I can access all resources and jsp's.
Q1: So in every BundleContex I create a HttpContext where Resources are registerd and a ServletContext can be created.
Is that correct so?
Q3: I've tried to include jsp's from a bundle via <jsp:include page="/contextA/content.jsp"/> that doesn't work.
Is it possible to include jsp's into a bundle from another bundle? Does anyone have a example?
Q4: Is it possible to register servlets and resources from different bundles within the same HttpContext?
Q5: Am I totally wrong? ;-)
Thx in advance.
|
|
|
|
Powered by
FUDForum. Page generated in 0.02737 seconds