Solved

How to change the directory for .properties file for Log Tag Library?

Posted on 2003-11-04
7
376 Views
Last Modified: 2010-04-01
I am using the Log Tag Library 1.0 from Jakarta Project. In the initialisation process, it suggest that in order not to have to initialize Log4j, the log4j.properties file will have to be placed in /WEB-INF/classes.

How do I have to do so that I could put the log4j.properties file in /WEB-INF/classes/config

Thank you.
0
Comment
Question by:Tuan_Jean
  • 2
  • 2
7 Comments
 
LVL 3

Accepted Solution

by:
applekanna earned 25 total points
ID: 9683934
in web .xml


<servlet>
<servlet-name>log4j-init</servlet-name>
<servlet-class>com.log.Log4jInit</servlet-class>
<init-param>
<param-name>log4j</param-name>
<param-value>WEB-INF/classes/config/log4j.properties</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

also check this thread,

http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_20786866.html

Hope this helps.
Cheers!

0
 

Author Comment

by:Tuan_Jean
ID: 9683944
Thank you. That's the same threat I have posted on a slightly different issues.

So, I will have to write a Servlet to initialise it and not able to change the /config directory with just some tag parameter setting?
0
 
LVL 3

Expert Comment

by:applekanna
ID: 9683954
Oops... Soory did not see the author :)

0
 
LVL 6

Expert Comment

by:jarasa
ID: 9778084
Hi.
Log4j is open source, so I suggest you to download the source files and see how is it doint the inicialization process, I don't use this log but I guess it must be the best way to change it.
Javier
0
 

Author Comment

by:Tuan_Jean
ID: 9807328
I created a servlet and it will kick start the application. Thank you.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
unit test DAO layer 1 137
approach on java challenges Approach on java challenges or real world challenges 29 160
java operators 3 114
instanceof  operator in java 26 91
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Binary Differential Replication, What it is, how it works and how it differs from standard delta file replication
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question