We have the following config in our web.xml:

<servlet>
        <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
       
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
             <param-value>/WEB-INF/applicationContext.xml</param-value> 
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

In the below config, how do you load the applicationContext.xml?

https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/war-spring-osgi/src/main/webapp/WEB-INF/web.xml
<https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/war-spring-osgi/src/main/webapp/WEB-INF/web.xml>
  

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xmlns="http://java.sun.com/xml/ns/javaee";
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd";
        id="WebApp_ID" version="3.0">

        <display-name>HelloWorldSpring</display-name>
        <welcome-file-list>
                <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>

        <context-param>
                <param-name>contextClass</param-name>
        
<param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
        </context-param>

        <servlet>
                <servlet-name>dispatcher</servlet-name>
        
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
                <init-param>
                        <param-name>contextClass</param-name>
                
<param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
                </init-param>
        </servlet>

        <servlet-mapping>
                <servlet-name>dispatcher</servlet-name>
                <url-pattern>*.do</url-pattern>
        </servlet-mapping>

</web-app>



--
View this message in context: 
http://karaf.922171.n3.nabble.com/cannot-resolve-to-absolute-file-path-in-karaf-3-0-0-tp4032407p4032792.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to