users@jersey.java.net

[Jersey] Multiple Servlets

From: Mark E. Juchems <Juchems_Mark_E_at_cat.com>
Date: Mon, 13 Feb 2012 14:59:41 -0600

Dudes,

Not sure if this is the appropriate place for this...

I am using Jersey 1.10. I want to segment my services (different
audiences) so I am using 2 different servlets:

        <servlet>
                <servlet-name>Inspect Service</servlet-name>
                <servlet-class>
com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class>
                <init-param>
                        <param-name>
com.sun.jersey.config.property.packages</param-name>
                        <param-value>cat.dds.cds.rest.inspect</param-value
>
                </init-param>
                <init-param>
                        <param-name>
com.sun.jersey.spi.container.ContainerResponseFilters</param-name>
                        <param-value>cat.dds.cds.utils.LoggingFilter</
param-value>
                </init-param>
                <load-on-startup>20</load-on-startup>
        </servlet>

<servlet>
                <servlet-name>Lookup Service</servlet-name>
                <servlet-class>
com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class>
                <init-param>
                        <param-name>
com.sun.jersey.config.property.packages</param-name>
                        <param-value>cat.dds.cds.rest.lookup</param-value>
                </init-param>
                <init-param>
                        <param-name>
com.sun.jersey.spi.container.ContainerResponseFilters</param-name>
                        <param-value>cat.dds.cds.utils.LoggingFilter</
param-value>
                </init-param>
                <load-on-startup>20</load-on-startup>
        </servlet>

The problem is this. When I hit the HEAD function, I get both services
mashed together in the WADL and the XSD. Any way to make those seperate?
I don't want users to view the services they don't have...


mark juchems
caterpillar inc.
dcs web solutions
lc building
309.675.6349