aspose file tools*
The moose likes Servlets and the fly likes How to create a .war file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to create a .war file?" Watch "How to create a .war file?" New topic
Author

How to create a .war file?

Shashi Kanta
Ranch Hand

Joined: May 08, 2002
Posts: 89
hello everybody,
i am using weblogic server 6.1.
I have followed all the procedures given at the url:
http://e-docs.bea.com/wls/docs61/programming/packaging.html#1036151
for packagind a web application.
i created the staging-directory as "stage" and under it had created the sub directories "WEB-INF/classes" and "META-INF".
i had put the servlet class under the classes directory and had executed the command:
java weblogic.ant.taskdefs.war.DDInit stage
at the command line of the parent directory of stage, and had succesffuly managed generating the
"web.xml" and "weblogic.xml" deployment descriptors in the "WEB-INF" directory.
now i tried to create a .war file as myApp.war. so i executed the following command at the command prompt of the parent directory of "stage":
jar cvf myapp.war -C stage
but the .war file is not getting generated!!!
why is it so?!!
can anybody help, pls?
rgds,
Shashi
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Try this
cd stage
jar -cvf myapp.war *.*


Groovy
Shashi Kanta
Ranch Hand

Joined: May 08, 2002
Posts: 89
hi,
what u r saying will create the .war file consisting of only the files in the stage directory, but not the files in the subdirectories!
my mistake was, that since i'm at the parent directory of "stage" i don't have to change directory!! so -C option was not supposed to be included!
now it works!!
anyway thnx for ur time!!
rgds,
Shashi
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

*.* will include the sub directories as well.

Originally posted by Shashi Kanta:
hi,
what u r saying will create the .war file consisting of only the files in the stage directory, but not the files in the subdirectories!
my mistake was, that since i'm at the parent directory of "stage" i don't have to change directory!! so -C option was not supposed to be included!
now it works!!
anyway thnx for ur time!!
rgds,
Shashi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to create a .war file?