Example usage for org.springframework.web.context.support XmlWebApplicationContext DEFAULT_CONFIG_LOCATION_PREFIX

List of usage examples for org.springframework.web.context.support XmlWebApplicationContext DEFAULT_CONFIG_LOCATION_PREFIX

Introduction

In this page you can find the example usage for org.springframework.web.context.support XmlWebApplicationContext DEFAULT_CONFIG_LOCATION_PREFIX.

Prototype

String DEFAULT_CONFIG_LOCATION_PREFIX

To view the source code for org.springframework.web.context.support XmlWebApplicationContext DEFAULT_CONFIG_LOCATION_PREFIX.

Click Source Link

Document

Default prefix for building a config location for a namespace.

Usage

From source file:org.n52.wfs.WfsDispatcherServlet.java

protected String getDefaultConfigLocations() {
    // -> /WEB-INF/dispatcher-servlet.xml
    return XmlWebApplicationContext.DEFAULT_CONFIG_LOCATION_PREFIX + getNamespace()
            + XmlWebApplicationContext.DEFAULT_CONFIG_LOCATION_SUFFIX;
}

From source file:fi.eis.applications.osgi.support.OsgiBundleXmlWebApplicationContext.java

/**
 * {@inheritDoc}//from   w ww  .j  a  v a 2  s.  c o  m
 * 
 * Returns the default location for the root context. Default values are
 * "/WEB-INF/applicationContext.xml", and "/WEB-INF/test-servlet.xml" for a
 * context with the namespace "test-servlet" (like for a DispatcherServlet
 * instance with the servlet-name "test").
 * 
 * @see XmlWebApplicationContext#getDefaultConfigLocations()
 * @see XmlWebApplicationContext#DEFAULT_CONFIG_LOCATION
 */
protected String[] getDefaultConfigLocations() {
    String ns = getNamespace();
    if (ns != null) {
        return new String[] { XmlWebApplicationContext.DEFAULT_CONFIG_LOCATION_PREFIX + ns
                + XmlWebApplicationContext.DEFAULT_CONFIG_LOCATION_SUFFIX };
    } else {
        return new String[] { XmlWebApplicationContext.DEFAULT_CONFIG_LOCATION };
    }
}

From source file:com.productone.spring.ServerOsgiBundleXmlWebApplicationContext.java

/**
 * The default location for the root context is
 * "/WEB-INF/applicationContext.xml", and "/WEB-INF/test-servlet.xml" for a
 * context with the namespace "test-servlet" (like for a DispatcherServlet
 * instance with the servlet-name "test").
 *//*w w  w.ja  v  a 2s. c o m*/
@Override
protected String[] getDefaultConfigLocations() {
    String ns = getNamespace();
    if (ns != null) {
        return new String[] { XmlWebApplicationContext.DEFAULT_CONFIG_LOCATION_PREFIX + ns
                + XmlWebApplicationContext.DEFAULT_CONFIG_LOCATION_SUFFIX };
    } else {
        return new String[] { XmlWebApplicationContext.DEFAULT_CONFIG_LOCATION };
    }
}