Hi all,

I have strange problem. I am building standard web application (with Maven).
The structure of the output WAR is as follows:

WAR
 | - - META-INF
 |     | - - ...
 |
 | - - WEB-INF
       | - - classes
       |     | - - compiled_classes
       |     | - - all_necessary_files (e.g. common.xml)
       |
       | - - lib
       |     | - - all_necessary_jars
       |
       | - - beans.xml
       | - - web.xml

In web.xml I need to load few configuration files (for Spring - in this
example it is common.xml file):

<web-app>
    [...]
        <context-param>
                <param-name>contextConfigLocation</param-name>
                <param-value>common.xml</param-value>
        </context-param>
    [...]
</web-app>

While deploying the application in Tomcat I receive errors (from Spring I
guess), because Spring or Tomcat doesn't see the common.xml file (which is
located in WEB-INF/classes). Aren't files in WEB-INF/classes added to
classpath? If i specify WEB-INF/classes/common.xml path, the file is seen by
Spring, but I use also other Spring configuration files (can't be modified),
which need to refer to these files without WEB-INF/classes path (param-value
= common.xml).
What is more we have some WAR files with the configuration shown above (like
<param-value>common.xml</param-value>) and everything works fine. So why I
receive the error?

Hope that is not as hard to solve as it seems to me!
-- 
View this message in context: 
http://www.nabble.com/Spring-or-Tomcat-forgets-the-classpath--tp18026497p18026497.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to