Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2003-11-04
7
Medium Priority
?
383 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 100 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Ranking ecommerce websites is a vital process. You need to have a strong SEO (Search Engine Optimization) strategy. If you don’t have one, you are losing out on brand impressions, clicks and sales. Check this guide on how to improve website traffic …
Loops Section Overview
Screencast - Getting to Know the Pipeline

886 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