#1 is fairly simple. As long as you have a way to set log4j.configuration as a system property, you should be able to use log4j from anywhere, portably. Of course, each server has it's idiosyncracies as to how it uses log4j (categories, trace-level extensions, etc). You may want to look at jakarta-commons-logging. It's basically a veneer on top of different logging implementations. You may never have total portability, since it's not part of j2ee spec.
#2 is a different story. Many have asked about application-level log4j configs, a few have claimed they have done it, but I have yet to see anyone offer a working example.
You can have your config files in your app or elsewhere. Just setup log4j in your app using your config file.