I can't imagine that nobody met this problem.
Is it possible to call Jetty methods from a bean or with jetty-web.xml? If it is, how can I do that?
Jetty XML is a very thin layer which introspects directly on and calls the underlying Java objects.
in your jboss-service.xml the context of the call is a org.mortbay.jetty.Server.
in a WEB-INF/jetty-web.xml it is a org.jboss.jetty.JBossWebApplicationContext - since you are configuring a single webapp - not the whole server.
You will need the javadoc to see exactly what methods are available on each class. Once you get the idea, you can do pretty much anything you like with this scheme - it's just the learning curve is a little steep at the beginning.
Thank you very much, Jules!
I share my solution to help those people who also encounter this problem. Here you are:
a jetty-web.xml in a WEB-INF directory creates a new HttpContext when deploying the webapp:
I still don't know how to ident source with whitespaces not to be removed by the forum. Sorry for that.
So effectively, you are binding an external root to static content, into a virtual root within your webapp/dynamic-content.. ?
yes exactly. I have a folder, which can vary in each deployment, containing updates. I need to reach it via http to make the clients be able to download the updates. that is why I wanted to bind this directory to a http context.