• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

J2EE classpath question

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a Web app that is packaged in a WAR file. I am using a properties file which I need to be in the classpath in order for it to get loaded. I have tried putting it under /WEB-INF/conf and under /WEB_INF/lib, but neither one works - those directories don't seem to be in the classpath. How can I add them to the classpath?
I've tried putting the file under /WEB-INF/classes, and this works. However, I don't want it to be there because it gets overwritten every time I do a build.
Thanks,
Jamie
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How about fixing the build script instead?
 
J Waldinger
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, true - but I'm not using ANT to do builds I'm using WSAD. There's various workarounds for this problem, but it just seemed wrong to me that /conf and /lib weren't in the classpath - and I don't know how to correct that.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
put the properties file in the java source package in webapp.
Regards
Harjot
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic