• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

how to create WAR files

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i hava no idea about WAR files.How to create WAR files .What are the files or directorys need to crate it.
 
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have a look at this link, it explains WAR quite well -
http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/WCC3.html
- Manish
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
You need to have RI to see some code in action for link given by Manish.Its lot better to have RI and check for urself some code in action.So if u dont have the RI download it from the Sun site.WAR stands for Web ARchive and essentially this is very similar to JAR but when we pack together the web components, the WAR is an appropriate term .
Cheers,
Gaya3

----------------
Prasanna Kumar R.V
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean by RI?
 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Tina Williams:
What do you mean by RI?


J2EE Reference Implementation.
This comes along with Sun J2EE SDK
 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai,
War stands for web archive. U can copy the file to ur web server root directory. so that it will extract automatically to the root folder and u can simply rum that from there.
But What is this RI?
 
Author
Posts: 399
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all...
This confusion about RI...well Sun has 2 containers to run J2EE application
1. J2EE Reference Implementation(J2EE RI)
2. Sun One Application Server(SoAS)
J2EE RI
This one is for pc's having <128MB RAM on Win 2k or Win98,Win Me.
J2EE RI

SoAS
This is for systems running Win2k with >128 MB RAM.
SoAS
Copy of J2EE SDK
hth
MB
[ September 17, 2003: Message edited by: Malhar Barai ]
 
Sheriff
Posts: 67735
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure what Gayathri is taking about: you do not need any implementation of J2EE in order to create a war file.
You can create it by hand using any zip tool as long as you make sure that the folder structure within the zip file follows the war file format.
The best way that I've found to create them (as well as manage all other build operations) is using Apache Ant.
Now, when it comes time to deploy the war file, of course you need a Servlet/JSP engine. Any spec-compliant engine will do (I favor Jakarta Tomcat and Caucho Resin myself).
hth,
bear
[ September 17, 2003: Message edited by: Bear Bibeault ]
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And if you want to learn about how to use Ant to make deployable war files you might consider reading my recent series of articles on making web applications in the Java Ranch Newsletter.
 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've installed apache-ant.
while executing ant command i got:
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Bad command or file name
please help
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A .war file simply contains your web application structure.
You should have a directory something like this:
index.html
...
WEB-INF/
WEB-INF/web.xml
WEB-INF/classes/
WEB-INF/classes/Foo.class
...
Then create the .war file using
Read the tutorial links mentioned above for more detail, but the basics are pretty simple.
 
ramdas pradeep kumar
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is ant is a tool for creating war files?
will ant create xml,web-inf... all these atomatically.?
 
Jason Davies
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ant is a Java build tool, similar to make. Ant can be used to create WAR files, only if you have the correct entries in the Ant build.xml configuration file.
In fact you can just use the jar task in one of your targets like this:

The directory structures can also be automatically created. Perhaps you would use something like the following:

Ant is very powerful and can be used for all sorts of things to save you time.
 
Skool. Stay in. Smartness. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic