Maybe because the file path separator you used not consistent:
File savedFile = new File("C:/apache-tomcat-6.0.16/webapps/example/"+"images\\"+finalimage);
if you using Windows, change your file path separator to '\\' instead of '/':
File savedFile = new File("C:\\apache-tomcat-6.0.16\\webapps\\example\\"+"images\\"+finalimage);