I am trying to deploy a tomcat servlet in glassfish and after a couple of weeks making changes I did it. 

Now I have another problem. I am using log4f to create log files to store my logs and it doesn't work.

I read that I should make some modifications but I don't know what to do exactly.

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.

If you need any config file to be shown here, just tell me. I don't know what to show you.