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

loading properties into the classpath

 
Andy Hahn
Ranch Hand
Posts: 225
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I found out that it is possible to load .properties files into the classpath by simply adding them to the WEB-INF/classes directory and then starting Tomcat. Is also possible to load classes by placing them in WEB-INF/lib? Or do the only files loaded from WEB-INF/lib include .jar files?

I have a jar file that is going to run on a 3rd party j2ee application and I do not have access to a classes directory, but I need to add a property file into the classpath.

Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do the only files loaded from WEB-INF/lib include .jar files?


True.

You either need to put the properties file in the WEB-INF/classes hieararchy, or put it in a jar file to drop into WEB-INF/lib.
 
Andy Hahn
Ranch Hand
Posts: 225
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That works. Thanks.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic