What is the "default applicationContext" in Jersey?

I am using Jersey to do acceptance testing on RESTful web services. It looks like my applicationContext.xml is not loading on client load. I see the following log output:

INFO: Using default applicationContext 

      

Is this the "standard" soemthing file that Jersey downloads when it can't find my file? Or does it indicate that my file was found?

@ContextConfiguration(locations={"/applicationContext.xml", "/applicationContextTest.xml"})
public class BaseResourceTest extends JerseyTest {

    final static URI baseUri = UriBuilder.fromUri( "http://localhost" ).port( 9998 ).build();

    public BaseResourceTest() throws Exception {        
        super(new WebAppDescriptor.Builder("xxx.yyy.zzz").contextPath(baseUri.getPath())
                .contextParam(
                    SpringServlet.CONTEXT_CONFIG_LOCATION, "classpath:applicationContextTest.xml" )
                .servletClass(SpringServlet.class )
                .contextListenerClass( ContextLoaderListener.class )                
                .build());
    }

.......
some tests
.......

}

      

my web.xml:

<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:applicationContext.xml</param-value>
</context-param>

<listener>
    <listener-class>xxx.yyy.LoggingAssuranceListener</listener-class>
</listener>

<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<servlet>
    <servlet-name>jersey-servlet</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>xxx.yyy.zzzz</param-value>
    </init-param>
    <init-param>
        <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
        <param-value>true</param-value>
    </init-param>
    <init-param>
         <param-name>com.sun.jersey.config.property.WadlGeneratorConfig</param-name>
         <param-value>xxx.yyy.zzz.BroadsoftWadlGeneratorConfig</param-value>
    </init-param> 
    <load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
    <servlet-name>jersey-servlet</servlet-name>
    <url-pattern>/*</url-pattern>
</servlet-mapping>

      

+3


source to share





All Articles