Announcement Announcement Module
Collapse
No announcement yet.
<import resource= in applicationContext.xml Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • <import resource= in applicationContext.xml

    Hello,
    I would like to put my applicationContext.xml outside of the WEB-INF directory for my Web application so it can easily be updated without having to update or recreate the .war file.

    I read somewhere outside of this forum that this should work:

    1. Create a new XML file (I called it ReportApplicationContext.xml)
    and place it in the desired path (I placed it in c:\context)
    2. Modify applicationContext.xml to look like this:

    <?xml version="1.0" encoding="UTF-8"?>

    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

    <beans>
    <import resource="file:c:/context/ReportApplicationContext.xml"/>
    </beans>



    However, after having done this, I'm getting java.io.FileNotFoundException: c:\context\ReportApplicationContext.xml (The system cannot find the path specified) eventhough the folder c:\context exists and the xml file exists in that folder.

    Is what I'm trying to do possible ?

    Thank you so much
Working...
X