anitha,
Did you verify that php_java.dll is located in the directory that's specified in your extension_dir directive? Also, is php_java.jar located in c:\web\php4\extensions\jdk1.2.2 as you specified?
Also, where did you download the php_java.dll and php_java.jar from? Make sure that the version of these files you got is compatible with php4.0.3 (that is, they were also built from that code base). The best place I know of to get binary versions of PHP (for Win32) and compatible extensions is http://www.php4win.de.
BTW, copying the dll's to winnt\system32 is not really required provided that they are in your PATH.
Alex