1) In the root of your project (or the root of your war file, or where ever is appropriate) create a new file called build.xml. It can ce called something else, but Eclipse automatically treats build.xml files as ANT files. 2) Paste the following and edit to taste. It assumes the build.xml is in the project root directory and class files for the WAR are in the 'build' directory, the jsps are in the 'jsp' directory and the web.xml is in src/web.xml and the war file will be placed in the project root and be called 'my.war'
Note that I just paraphrased the ant instructions here
Now if you open the file in the Eclipse ANT editor and have the 'Outline' view open as well, you can right click the 'build_the_war' target and select 'Run as'> and then Ant. VIola, a war should appear. (I hope )
shekar march chandra
Joined: Jul 07, 2005
Really I was wondering how to write Ant script for creating war file.
After your suggestion and help, I was really happy.I followed the procedure told by you and created the war file and got deployed successfully in weblogic server.
Once again, Thanks a lot for your help.
By the way, I had doubts:
1. whats the difference between tomcat project and web project.