File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Open Source Projects and the fly likes struts & where to place Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "struts & where to place" Watch "struts & where to place" New topic

struts & where to place

Prashant Mehendru

Joined: Sep 01, 2003
Posts: 2
I am using log4j as my default logging system. Could you tell me if I can place in any folder besides the $\WEB-INF\classes\? And, if so, how? (I mean, where do I need to tell my application that it would find the properties file in "xyz" folder?)
R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5382
You can place your log4j properties file anywhere you wish.
If you place in the classes directory, then it automatically comes in the classpath and logger can find it from the classpath.
If you place your prop file anywhere else then in your initLog() method you pass the file path.


"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
Prashant Mehendru

Joined: Sep 01, 2003
Posts: 2
Actually, I had been looking for a default location for WebSphere. Something like the root folder where WebSphere searched first. Applying some hooks, I realized that it first read the /properties folder. So, I simply placed my there
Makes life much simpler And of course, efficient!
I am using the logger only for debugging purposes currently.
I agree. Here's the link:
subject: struts & where to place
It's not a secret anymore!