It is perfectly legal to have printlns in servlets.
Do you have in your app own logging classes, that are not present in JBoss / your app version on JBoss?
Thanks for your reply.
But i don't have any logging classes for my application. I am using simple log4j for this purpose.
One more observation regarding this. I have a common.jar which is lying in my WEB-INF/lib directory. If i am having a Syste.out.println in any of these classes in jar file, then i am facing this problem. But if i am haing System.out.println in any of classes which are in WEB-INF/classes folder, that is working fine.
I am not completely sure, but afair the apache commons*.jar rely on commons-logging.jar for their logging. So this sounds like commons-logging might be missing. Just add it to your WEB-INF/lib