I have added severval jar files which are in hard drive.
Does this mean you were making your web application outside the hard drive?
If those JAR files were placed inside the WEB-INF/lib directory of the WAR, it'd work.
It could mean that the jar files are being added to the class path and not the lib folder.
I'd recommend coping the jar files from whatever location you have them to the WEB-INF/lib folder. That way they would be in the class-path while writing the app and would also be available at run time to the war file....