• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

.WAR files

 
sindhu
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there,

Can anyone plz tell me how to create .war files from class files.

I want to autodeploy .war files from sun application server 8.1

Thanks
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From a command line at the root of your expanded WAR directory structure:

[ September 22, 2005: Message edited by: Paul Sturrock ]
 
Henry Wong
author
Marshal
Pie
Posts: 21420
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see that I am not the only person who uses "jar" to create war files. My colleagues like to use "zip", because "jar" creates an extra manifest file and directory, that is not needed. Personally, it doesn't bother me.

Henry
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"sindhu"

Welcome to JavaRanch. We don't have many rules around here, but the one that we do have is our JavaRanch Naming Policy. Please take a moment to read it, and then please change your display name to comply. (We are looking for a first and last name.

Thank you very much,
 
Manikanta Sabarish
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see that I am not the only person who uses "jar" to create war files. My colleagues like to use "zip", because "jar" creates an extra manifest file and directory, that is not needed. Personally, it doesn't bother me.


can we use "zip" files instead of "war"
then,do all servers support "zip" format.?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. But you can use zip to create wars.
 
Tom Blough
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Manikanta,

WARs and JARs are just zip files. You can create and view the contents of a ?ARs with any zip program. When you create a ?ar file using a zip program, just change the zip extension to the appropiate one.

As was previously pointed out, you need to add a manifest manually when building a JAR using a zip program.

Cheers,
 
Tony Morris
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Henry Wong:
I see that I am not the only person who uses "jar" to create war files. My colleagues like to use "zip", because "jar" creates an extra manifest file and directory, that is not needed. Personally, it doesn't bother me.

Henry


Point your colleagues to the -M option.

-M do not create a manifest file for the entries

Better still, use Apache Ant.
If I could have a dollar for each time I've seen a EAR/WAR/JAR refuse to function because it was archived using some arbitrary tool...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic