tags:

views:

399

answers:

0

when i run my application i am getting an exception of javax.servlet.ServletException: org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: WEB-INF\jdbc.properties (The system cannot find the path specified) org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515) org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:422

eventhough file is present it is giving me exception.

i am initialising my ApplicationContext as under

public class SufalamContext {

private static ApplicationContext context;

private SufalamContext(){ 
}

public static ApplicationContext getContext() {
  if(SufalamContext.context==null) {
   SufalamContext.initContext();
  }  
 return SufalamContext.context;
}

private static void initContext(){
 SufalamContext.context = new FileSystemXmlApplicationContext("c:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/struts-spring/WEB-INF/webApplicationContext.xml");
}

}

The spring-common-applicationcontext.xml is as under

--> /WEB-INF/jdbc.properties

the file is present in WEB-INF.

please help. Thanks in advance