aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes J2EE classpath question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "J2EE classpath question" Watch "J2EE classpath question" New topic
Author

J2EE classpath question

J Waldinger
Greenhorn

Joined: Sep 05, 2003
Posts: 12
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
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
How about fixing the build script instead?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
J Waldinger
Greenhorn

Joined: Sep 05, 2003
Posts: 12
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.
Harjot Narula
Greenhorn

Joined: Sep 22, 2003
Posts: 11
Hi
put the properties file in the java source package in webapp.
Regards
Harjot
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: J2EE classpath question