title: How to use log4j in glassfish
body: <p>I am trying to deploy a tomcat servlet in glassfish and after a couple of weeks making changes I did it. </p>
  
  <p>Now I have another problem. I am using log4f to create log files to store my logs and it doesn't work.</p>
  
  <p>I read that I should make some modifications but I don't know what to do exactly.</p>
  
  <p>I have my log4j.properties and logback.xml files. I have other 2 servlet also with this library and also writing to their own files fine in tomcat. So I need an explanation valid for any servlet.</p>
  
  <p>If you need any config file to be shown here, just tell me. I don't know what to show you.</p>