Reputation: 2311
I have a sample JAX-RS service being exposed via the awesome jaxrs:server directive via cxf + spring. I wanted to configure the underlying jetty being started to also set the username via jcifs and am resorting to configuring it via the httpj directive from cxf again.
<httpj:engine-factory bus="cxf">
<httpj:engine host="#{inetAddress.hostName}" port="${com.kilo.restful.port}">
<httpj:handlers>
<bean class="org.eclipse.jetty.servlet.ServletContextHandler">
<property name="servletHandler">
<bean class="org.eclipse.jetty.servlet.ServletHandler">
<property name="filters">
<list>
<bean
class="org.eclipse.jetty.servlet.FilterHolder">
<property name="name" value="NTLMFilter" />
<property name="filter">
<bean class="jcifs.http.NtlmHttpFilter"/>
</property>
<property name="initParameters">
<map>
<entry key="jcifs.http.domainController" value="domaincontroller.kilo.com" />
</map>
</property>
</bean>
</list>
</property>
<property name="filterMappings">
<list>
<bean class="org.eclipse.jetty.servlet.FilterMapping">
<property name="pathSpec">
<value>/*</value>
</property>
<property name="filterName" value="NTLMFilter" />
</bean>
</list>
</property>
</bean>
</property>
</bean>
</httpj:handlers>
</httpj:engine>
</httpj:engine-factory>
However, I don't see the control reaching the doFilter call of NtlmFilter though the filter seems to get initialized alright. Have been trying to figure out what may go wrong and have wasted the better part of my day already. Any pointers will help! Thanks in advance!
Upvotes: 2
Views: 398
Reputation: 2311
Figured out from the mailing list that this is not supported. I had to switch over to using the web.xml (placed in src/main/webapp)
Server server = new Server(portNumber);
WebAppContext root = new WebAppContext();
root.setContextPath("/");
root.setWar("src/main/webapp");
server.setHandler(root);
server.start();
server.join();
Upvotes: 1