I can tell you how to do it from the command line:
Cd to the root of your webapp. Type: jar cvf MyApp.war *
For something Eclipse specific, you might want to check out our IDEs forum. http://www.coderanch.com/forums/f-12/vc [ August 31, 2005: Message edited by: Ben Souther ]
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 )
Dave
shekar march chandra
Greenhorn
Joined: Jul 07, 2005
Posts: 25
posted
0
Hi David,
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.
2. Is the procedure same even for ejbs.
Thanks, Chandra
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.