I dont know where I am going wrong.
I have created one ant build script to generate war file.The war file successfully created.But the classes file get created in web-inf directory as well as in base directory.
Kindly correct me where I am going wrong.
what change I have to do over there?
Sorry for asking this because if I comment the line <fileset dir="${classes.dir}"></fileset>
classes is not bundled in the web-inf directory as well as base dir also.
You can use a classes element instead of that fileset, or you could use basedir attribute. For "classes" usage, see the example at the bottom of war task documenation.
Lines 52 and 53 cause the class files to be copied to WEB-INF/classes in the WAR because earlier, lines 40 to 43 the java source files were compiled into the ${web.dir}/WEB-INF/classes directory.
Line 54 causes the class files to be copied to the base directory of the WAR. Remove that line.