Cómo configurar la ruta de contexto raíz de Spring

Soy un novato de Spring y estoy armando una aplicación web de Spring (no Spring-boot, ¿qué diferencia hace esto?). La implementación se realiza en un servidor Tomcat 7.

La aplicación está en funcionamiento. Mi problema es que solo se puede acceder a través de la URL estándar:

http://mycompany.com:8081/cwing-0.0.3-SNAPSHOT/index.html

Lo siguiente no funciona:http://mycompany.com:8081/cwing-0.0.3-SNAPSHOT http://mycompany.com:8081/cwing-0.0.3-SNAPSHOT/

aunque mi web.xml enumera index.html como la página de bienvenida.

Un síntoma adicional del problema es que todo tipo de enlaces dentro de la aplicación deben especificarse como relativos, en lugar de con un '/' antepuesto.

Pero incluso estas URL no son lo que realmente quiero.

Prefiero especificar

http://mycompany.com:8081/cwing

y haga que aparezca el index.html.

Siguiendo el ejemplo deAgregar ruta de contexto a la aplicación Spring Boot

Creé un archivo application.xml en src / main / resources con el siguiente contenido:

server.contextPath=/cwing
server.port=8081

Esto no funcionahttp://mycompany.com:8081/cwing abre una página en blanco, con un error 404 en el servidor, al igual quehttp://mycompany.com:8081/cwing/index.html.

Debo estar perdiendo algo. ¿Qué más se necesita para que esto funcione como quiero que funcione?

ACTUALIZACIÓN: como se le solicitó, aquí está el web.xml (detalles irrelevantes eliminados).

    <?xml version="1.0"?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
              http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
              version="3.0">
      <display-name>cwing</display-name>

        <!-- Creates the Spring Container shared by all Servlets and Filters -->
        <listener>
            <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>
        <!-- The definition of the Root Spring Container shared by all Servlets 
            and Filters -->
        <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>
            /WEB-INF/spring/context.xml
            /WEB-INF/spring/datasource.xml
            /WEB-INF/spring/security.xml
            </param-value>
        </context-param>

        <servlet>
            <servlet-name>d</servlet-name>
            <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
            <init-param>
                <param-name>contextConfigLocation</param-name>
                <param-value>
                    /WEB-INF/spring/context.xml
                    /WEB-INF/spring/datasource.xml
                    /WEB-INF/spring/security.xml
                </param-value>
            </init-param>
            <load-on-startup>1</load-on-startup>
            <async-supported>true</async-supported>
        </servlet>

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

        <!-- Disables Servlet Container welcome file handling. Needed for compatibility 
            with Servlet 3.0 and Tomcat 7.0 -->
        <welcome-file-list>
            <welcome-file>index.html</welcome-file>
        </welcome-file-list>

        <filter>
            <filter-name>springSecurityFilterChain</filter-name>
            <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
        </filter>

        <filter-mapping>
            <filter-name>springSecurityFilterChain</filter-name>
            <url-pattern>/*</url-pattern>
        </filter-mapping> 
...
</web-app>

Respuestas a la pregunta(1)

Su respuesta a la pregunta