SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 41 | Next

Larry Brown, Marty Hall, and Yaakov Chaikin

"Core Servlets and JavaServer Pages, Volume 2"


This approach works really well in a real-world project. The developers get to
keep using their favorite IDEs, which helps them be most productive, and the
project doesn??™t suffer from deployment inconsistencies because the compilation and
deployment is done by the same portable ant script. We have participated in
projects where several IDEs were used by different developers on the team working
on the same Web applications; some even used different operating systems for their
environments. The application deployment stayed consistent and the developers
were happy to be able to use whatever made each one personally more productive.
Isn??™t a happy developer what this is all about?
1.5 The Art of WAR: Bundling Web
Applications into WAR Files
Web archive (WAR) files provide a convenient way of bundling Web apps in a single
file. Having a single large file instead of many small files makes it easier to transfer
the Web application from server to server.
A WAR file is really just a JAR file with a .war extension, and you use the regular
jar command to create it. For example, to bundle the entire some-web-app application
into a WAR file named some-web-app.war, you would navigate to the
some-web-app directory and execute the following command:
jar cvf some-web-app.war *
There is no special relationship between the jar command and WAR files. jar is
just one tool among others to use for bundling files together.


Pages:
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53