Announcement Announcement Module
Collapse
No announcement yet.
Import configuration xml from out side of WEB-INF folder Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Import configuration xml from out side of WEB-INF folder

    Hi,

    I have the workflow configuration xml file out side of WEB-INF folder in spring application.Whenever i have changed my workflow configuration in the xml based on that the application should run no need to build the war for each configuration change in th xml.so i tried to import the workflow configuration xml with in dispatcher-servlet.xml from outside of WEB-INF folder but it should not accept that.Is there any idea or suggest to load the xml from any other location in the system.

    I have got the following error when i import workflow xml from outside of WEF-INF folder.

    SEVERE: Context initialization failed
    org.springframework.beans.factory.BeanDefinitionSt oreException: IOException parsing XML document from ServletContext resource [/D:/workFlow.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/D:/workFlow.xml]


    Dispatch-servlet.xml


    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://www.springframework.org/schema/p"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schem...-beans-3.0.xsd
    http://www.springframework.org/schema/aop http://www.springframework.org/schem...ng-aop-3.0.xsd
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">

    <bean class="org.springframework.web.servlet.mvc.support .ControllerClassNameHandlerMapping"/>

    <import resource="applicationContext.xml" />
    <import resource="D:\workFlow.xml"/>

    <bean id="appDataLoad" class="sample.java.AppDataLoad" init-method="loadMasterData" >
    <property name="masterDAO" ref="masterDAO"/>
    <property name="workFlowDAO" ref="workFlowDAO"/>
    <property name="applicationDataModel" ref="applicationDataModel"/>
    <property name="workFlowDetails" ref="workFlowDetails" />
    </bean>

    <bean id="urlMapping" class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
    <property name="mappings">
    <props>
    <prop key="index.htm">indexController</prop>
    </props>
    </property>
    </bean>

    <!--The index controller.-->
    <bean name="indexController"
    class="org.springframework.web.servlet.mvc.Paramet erizableViewController"
    p:viewName="index" />

    <!--View Resolver definition -->
    <bean id="viewResolver"
    class="org.springframework.web.servlet.view.Intern alResourceViewResolver"
    prefix="/WEB-INF/jsp/"
    p:suffix=".jsp" />
    </beans>

    Kindly suggest,
    Thanks
    Kamaraj.c
    Last edited by mckamaraj; Sep 30th, 2011, 03:00 AM.
Working...
X