由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - 大家愿意讨论一下log4j么
相关主题
classpath 和 lib/ext 的区别?菜鸟请教版上大虾--如何用Java建一个连接Dababase的Tomcat网页
Re: Desperately need help on DB2 connection through jdbc in jsp pageservlet-mapping causing http 404 error
[转载] Urgent Help needed about Java Servlet?多个Log4J配置文件问题
Run Servlet with Tomcatstill web.xml question
求助!Tomcat下设置servlets的问题j2ee启动时, 启动了tomcat吗?
tomcat 访问硬盘文件的问题, 3xQuestion about Tomcat
J2EE: why is my .jsp not refreshed?请问JSP里这个怎么设
tomcat连接mysql求助Re: JSP菜鸟一问
相关话题的讨论汇总
话题: log4j话题: tomcat话题: web话题: path话题: app
进入Java版参与讨论
1 (共1页)
p***p
发帖数: 559
1
特别头疼的是,当几个不同的软件,比如Tomcat和网站都使用log4j,但是希望设置不同

policy时候,不知道如何写配置文件,放在哪里。每次都是碰运气。特别是现在使用什么
commenlogfactory之后
m******t
发帖数: 2416
2

You need multiple copies of log4j.property and log4j.jar.
For tomcat logging: put one log4j.jar in /common/lib,
and log4j.properties in /common/classes.
For your web app, put one log4j.jar in your WEB-INF/lib,
and log4j.properties at wherever you want, just give the path
when you configure it in the web app.

【在 p***p 的大作中提到】
: 特别头疼的是,当几个不同的软件,比如Tomcat和网站都使用log4j,但是希望设置不同
: 的
: policy时候,不知道如何写配置文件,放在哪里。每次都是碰运气。特别是现在使用什么
: commenlogfactory之后

p***p
发帖数: 559
3
我总是对web app的相对路径很糊涂,都是以webapps/your app/ 为root么

不同
什么

【在 m******t 的大作中提到】
:
: You need multiple copies of log4j.property and log4j.jar.
: For tomcat logging: put one log4j.jar in /common/lib,
: and log4j.properties in /common/classes.
: For your web app, put one log4j.jar in your WEB-INF/lib,
: and log4j.properties at wherever you want, just give the path
: when you configure it in the web app.

m******t
发帖数: 2416
4

There is "path" and "classpath". They are different. 8-)
This might be helpful for you:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html

【在 p***p 的大作中提到】
: 我总是对web app的相对路径很糊涂,都是以webapps/your app/ 为root么
:
: 不同
: 什么

1 (共1页)
进入Java版参与讨论
相关主题
Re: JSP菜鸟一问求助!Tomcat下设置servlets的问题
tomcat作server,jsp访问的文件必须在webapps/ROOT/?tomcat 访问硬盘文件的问题, 3x
Re: tomcat作server,jsp访问的文件必须在webapps/ROOJ2EE: why is my .jsp not refreshed?
Axis1.2RC3问题tomcat连接mysql求助
classpath 和 lib/ext 的区别?菜鸟请教版上大虾--如何用Java建一个连接Dababase的Tomcat网页
Re: Desperately need help on DB2 connection through jdbc in jsp pageservlet-mapping causing http 404 error
[转载] Urgent Help needed about Java Servlet?多个Log4J配置文件问题
Run Servlet with Tomcatstill web.xml question
相关话题的讨论汇总
话题: log4j话题: tomcat话题: web话题: path话题: app