|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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... |
|
#3
|
|||
|
|||
|
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... |
|
#4
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > What is a war file? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|