Whe I test them as standalone classes, the logs show up on the console, but while running through the servlets, these logs are not getting saved under "tomcat/logs" directory. Where & how can I specify that the logs should go under "logs"???
Commons Logging is just a think wrapper around the underlying logging API, usually it is LOG4J or in case of Java 1.4, the java.util.logging package, so that is where you have to configure your logging.
You may need to look up how to do it for your setup, but by default the loggers are only assigned a Console handler, you have to add a File handler that will write to the location you want.
I am using log4j I beliveve. can you pint out how can I do this? All the system.out.println are getting written to the log file correcly. Only my log.info() log.error() are not getting written I wonder why???