Hi Paul
Sorry for a delay.
I'm not sure I understand, so you'd like to have some context-params and
CXFServlet specific init-params set in a given web.xml and make them
available to the application context ?
Can you please show some configuration fragments which will help to
understand what exactly are you trying to achieve ?
Cheers, Sergey
I have a small JAX-RS application that I'm running through the servlet
transport.
I'd like to make the application configurable via init-param settings in
the corresponding web.xml file. I would like to keep the code
transport-neutral, so wanted to inject properties using the
applicationContext.xml spring file.
Prima facie, this should be possible. The CXF servlet transport
populates the "contextParameters" bean (using context-param, and
init-params setting) and this bean is accessible in spring via SpEL;
e.g., #{contextParameters['key']}.
However, this is not working: while context-param values are available,
the init-params are not.
A potential complication is that this is currently done with
jetty-maven-plugin, which I'm binding to the integration testing phase
to allow integration/functional testing as part of the build process.
Ultimately, my goal is to expose configuration options. If init-param
is not supported, what is the best way of achieving this?
I think the most important dependencies are:
spring-context 4.2.4.RELEASE
spring-web 4.2.4.RELEASE
cxf-rt-frontend-jaxrs 3.1.4
Cheers,
Paul.
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/