• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using PropertyResourceBundle on Tomcat

 
Ranch Hand
Posts: 250
Python Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,
Some of my beans read stuff from property files.
My earlier approach was using the Property class and IO to read the files. They were kept in tomcat's bin folder and it worked alright.
But when I changed the approach to using PropertyResourceBundle class, the files could no more be read from that location. After traversing through forums I came to the conclusion that I must keep the files inside WEB-INF/Classes and that too in the same package structure as my classes. Also I must call the file with its package path (say com.dcall.dc.myProp).
On the contrary, my code when kept on WebSphere 4.0 works finele where I keep the property files inside "WebSphere/AppServer/properties" folder and specify simply the proerty file name to PropertyResourceBundle class's setBundle().
Any thoughts?
 
reply
    Bookmark Topic Watch Topic
  • New Topic