[jetty-users] Setting init parameters when embedding Jetty
I have just started out woking with Jetty and I am trying to embed it within my WAR. All is going well so far, but I have one question that someone on this list might be able to answer.
I have structued the WAR so that I can either start it like a jar (java -jar myapp.war) or deploy it in an external servlet engine. Now I would like for the servlet to get some configuration info passed to it. I do this by readinf the init parameters I get from the servlet context. This works well if I deploy the WAR in an external servlet engine. Then I can use the override-web.xml feature in Jetty to configure and in Tomcat I might use a custom context.
When using the embedded Jetty server I would like to provide configuration info in the same way, from the servlet's perspective. The only way I have figured out so far is to use an override-web.xml file this case also. Is there some other way that I can modify the servlet's context so that it can get my init parameters?
I would like to avoid using context.setAttribute().
Any pointers will be greatly appreciated!