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!

Ref:
http://stackoverflow.com/questions/16776974/using-jcifs-in-cxf-embedded-jetty-in-spring

Reply via email to