dcsimg
In websphere 3.5 standard edition the servlets are not picking up the text files and property files from the relevant location.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   singar_nalendran
Posted On:   Monday, July 29, 2002 02:46 AM

The application server we are using is websphere 3.5 standard edition. In my servlet Iam having a file read code like FileInputStream file = new FileInputStream("MCSysProp.properties"); Properties p = new Properties(System.getProperties()); p.load(file); System.setProperties(p); I have tried putting these files in the deployment directory, servlet and lib directory. But in vain. The same thing is working fine with weblogic server. Finally I tried putting these files in system 32 then it is picking up fine. Tell me where to put these text files. regards singar    More>>


The application server we are using is websphere 3.5 standard edition. In my servlet Iam having a file read code like



FileInputStream file = new FileInputStream("MCSysProp.properties");
Properties p = new Properties(System.getProperties());
p.load(file);
System.setProperties(p);



I have tried putting these files in the deployment directory, servlet and lib directory. But in vain.


The same thing is working fine with weblogic server. Finally I tried putting these files in system 32 then it is picking up fine.


Tell me where to put these text files.




regards



singar

   <<Less

Re: In websphere 3.5 standard edition the servlets are not picking up the text files and property files from the relevant location.

Posted By:   ranjay_sinha  
Posted On:   Monday, August 19, 2002 09:11 AM

There are 2 classpaths for websphere application server. One is app server classpath which are loaded & available to all application when app sever started. 2nd is application classpath which are available to particular application & gets reloded at predefined time period. Since in your code
System.getProperties()

you r trying to read from system classpath(same as 1st case)then you must place your files in system classpath and not in application classpath( servlet & lib directory).If you want to read from application classpath then you can use following

java.util.ResourceBundle.getBundle("MCSysProp.properties").getString("datasource");
About | Sitemap | Contact