今天部署一个JSF项目到Websphere上,因为本机开发都是用Tomcat,所以Log4j.properties文件信息如下:
#
# $Revision: 1.2 $
# $Date: 2010/07/19 03:29:48 $
#
log4j.rootLogger=INFO, DefLog
#catalina.home 为读取系统环境变量的值
log4j.appender.DefLog=org.apache.log4j.RollingFileAppender
log4j.appender.DefLog.File=${catalina.home}/logs/flow.log
log4j.appender.DefLog.DatePattern='.'yyyy-MM-dd'.log'
log4j.appender.DefLog.maxBackupIndex=10
log4j.appender.DefLog.maxFileSize=10MB
log4j.appender.DefLog.Append=true
log4j.appender.DefLog.layout=org.apache.log4j.PatternLayout
log4j.appender.DefLog.layout.ConversionPattern=%5p [%t] [%d] (%c) - %m%n
然后用Ant打包项目生成war档部署在Webphere上,输入地址访问报500内部错误,然后查找log信息,费了好大的劲在以下目录下找到了log档:
(安装目录)\IBM\WebSphere\AppServer\profiles\AppSrv01\log