• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to create a .war file?

 
Shashi Kanta
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this
cd stage
jar -cvf myapp.war *.*
 
Shashi Kanta
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
*.* 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic