File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Property file in EAR

 
Alec Shcherbakov
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a property file located in a 'resource' folder in my enterprise application. This file is used by several EJB and Web modules, that is why I put it into the EAR. The manifest files of these modules contain the name of the folder in the EAR where the property file is located ('resource'). However the property file can't be loaded by ClassLoader.getResource().
If I put the property file into a jar-file and include jar-file name into the maifest file, everything works fine. The application server is Websphere 5.1.
This approach is described here:
J2EE Class Loading Demystified
Can anybody make any suggestion on what I might be doing wrong?
Thank you.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic