Hi This is Ashish, I am team mate of Pooja.
We found the problem and solution as well.
Actually the Jboss 3.2.3 uses tomcat 4.1.29 and jboss 4.0.5 uses tomcat 5.5.20. and naming-resources.jar and default.servlets.jar working is totally different in jboss 4.
We had overridden DefaultServlet and overriden the getResources() of DefaultServlet but in jboss 4.0.5, default-Servlet.jar does not use getResources() method call. Insteaed they have protected variable resources of ProxyDirContext.
we used the same to assigne to our docbase.