SunQuest
           Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old October 14th, 2002, 04:53 AM
jhazard jhazard is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 21 jhazard User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
What is a war file?

I have to create a war file to upload my application to our servers. Can someone tell me simply what it is and step by step how I create one?

Thanks.

Reply With Quote
  #2  
Old October 14th, 2002, 05:51 AM
ghatzhat ghatzhat is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 361 ghatzhat User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 9 m 5 sec
Reputation Power: 7
a war file is a "web archive" file and is used for deploying web applications. details on file structure and howto is here:

http://java.sun.com/webservices/doc...App3.html#75043

basically it's everything that should be in your web app (WEB-INF, web.xml, classes, lib, jsps etc) bundled up into a single file which the application server can unwrap automatically.
__________________
Little more than a playground for the bugs that live beneath us...

Reply With Quote
  #3  
Old October 14th, 2002, 06:26 AM
jhazard jhazard is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 21 jhazard User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for the link however I have a couple of questions before I can start.

The document mentions using the JAR tool distributed with the J2SE SDK. I found a jar.exe file but when I run it it just opens a dos like window and closes it again. How do I use this?

Another way it suggests is with the Ant war task (whats that?)
"Both of these methods require you to have created a Web application deployment descriptor. " What is a web application deployment descriptor?

"You can also package an application into a WAR using deploytool. "
Deploytool?

Thanks in advance...

Reply With Quote
  #4  
Old October 14th, 2002, 10:54 AM
ghatzhat ghatzhat is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 361 ghatzhat User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 9 m 5 sec
Reputation Power: 7
sorry, there was some superfluous stuff in that document - i don't know about ant and deploytool, except that you won't need them - what is important is the file structure with the WEB_INF folder and the classes folder etc. if you're using javabeans or taglibs then this structure will be essential - if you just have straight jsps then it's not so important.

ther'e nothing magical really - think of it as a zip file that the app server can unbundle automatically. it's called war after the tar format (tape archive) familiar to *nix users.

as for the jar.exe, run it from a command prompt.

the web app deployment descriptor is the web.xml file which holds directives to configure such things as the default document for the app.

have a look at this page:

http://jakarta.apache.org/tomcat/to...deployment.html

it refers to tomcat4, but the file structure is defined in specifications (i don't remember which set of specs!) so something similar will apply for other app servers.

hope this helps.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > What is a war file?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway