jar cvf storefront.war . Because you changed to (Web hosting companies)
Wednesday, December 12th, 2007jar cvf storefront.war . Because you changed to the root directory, the storefront directory will not be included in the WAR file. This is fine, because you may want to call the root directory something else when it’s installed. When you install the web application, if you plan to explode the WAR file, all you need to do is create a directory and un-jar the files, like this: C:tomcatwebapps>mkdir storefrontC:tomcatwebapps>cp storefront.war storefrontC:tomcatwebapps>cd storefrontC:tomcatwebappsstorefront>jar xf storefront.war The location where the WAR file gets expanded is container-dependent. If you plan to distribute the WAR file without exploding it, all you have to do is place it in the appropriate place for the container. You don’t have to recreate the storefront directory, although you might want to delete the existing directory when deploying a newer version. Some containers are not good at removing old files before deploying an updated WAR file. Although Section 9.8 of the 2.3 Servlet specification is a little ambiguous about replacing a web application without restarting the server, most containers allow you to drop in a new WAR file or replace certain files without restarting. There’s always a danger with leaving this feature on in a production environment; however, while developing the application or debugging a problem, you’ll quickly learn to appreciate this functionality. In containers that do support this feature, there’s usually a way to disable it when you deploy a web application into production. 16.4 Building Your Struts Applications with Ant Although there are several different mechanisms to compile and deploy your Struts application, by far the most popular and most flexible is the Ant build tool.[3] This section discusses how to use Ant to perform the necessary tasks for compiling and packaging your application. [3] Ant is an acronym for “Another Neat Tool.” 16.4.1 What Is Ant? Ant is a platform-independent build tool that can be configured to compile your Java source code files, build your deployment JAR and WAR files, unit-test your code, and create your project’s JavaDoc documentation. It also has many other uses and can be expanded to perform new tasks of your own creation. Ant is similar to the Unix make utility (also known as gmake in Linux and nmake in DOS/Windows). make utilities have been used for generations to manage projects for languages such as C and C++, but these utilities are platform-dependent because the rules they use are typically shell commands executed by the host operating system. Unlike make, Ant’s rules (or tasks, in Ant terminology) are Java classes and can be run on any platform with a supported JVM.
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.