Hi folks,
Hope someone can help me out here, I have a applicationContext.xml that references a jdbc.properties file like this:
And this works fine when I use the XmlWebApplicationContext loading from the servlet, so when tomcat comes up it picks everything up as it should....Code:<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location"><value>/WEB-INF/jdbc.properties</value></property> </bean> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName"><value>${jdbc.driverClassName}</value></property> <property name="url"><value>${jdbc.url}</value></property> <property name="username"><value>${jdbc.username}</value></property> <property name="password"><value>${jdbc.password}</value></property> </bean>
However when I try to instantiate a ClassPathXmlApplicationContext and give it applicationContext.xml in it's constructor it's throwing a java.io.FileNotFoundException and stating that it can't open WEB-INF/classes/jdbc.properties
Anyone any ideas? I feel a bit stuck...
Thanks in advance,
Marty


Reply With Quote