• Post Reply Bookmark Topic Watch Topic
  • New Topic

Log4j in JSP

 
velgapudi suresh
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Frends

I want to know how to write runtime exceptions from Jsp Page. Im using Jboss App.Server wtih this how v can create Log4j file in log folder and store the particular error.... msgs
 
Kamesh Rao
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Place the log4j.properties in your WEB-INF/classes folder.
Set the following in the properties file

#set the root looger
log4j.rootLogger=DEBUG, RollingFile


log4j.logger.org.apache=ERROR


log4j.appender.RollingFile=org.apache.log4j.RollingFileAppender
log4j.appender.RollingFile.File=<pathwhere you want to store the logs>
log4j.appender.RollingFile.Encoding=UTF-8
log4j.appender.RollingFile.MaxFileSize=20MB
log4j.appender.RollingFile.Threshold=DEBUG

Hope I got your question correct
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!