Eclipse Play War Pack

Source: Internet
Author: User
Tags pack tomcat tomcat server

Eclipse War Pack Method collection
On the Internet to find the method of packaging eclipse, search for a long time, also did not find a better way, before knowing that you can use the command to package, has been looking for like JBuilder development tools in the compilation of together with the war package method can not find. So his own model, and finally know how to do, now write down the experience, share with you, hope to help a friend in need.

If there is anything wrong, please correct me.

First open the project to package, select "Deploy myeclipse Java project to Server ..."--> Open the Window "Manage deployments", select the project to package in the project options, click on the right " Add button, open the window "New Deployment", select the server in the Servers option, select "Packaged Archive (production mode)" In the Deploy type option, and finally "Finish" and Return to " Manage Deployments "window, click" OK ", finally run the project can be completed. At this point, you open the server, such as the Tomcat installation path, open the Wabapps directory, you can see the packaged, the project named War file.

This article from Csdn Blog, reproduced please indicate the source: http://blog.csdn.net/heartsky189/archive/2009/03/28/4032028.aspx

-----------------

In the Java development Web, most of you will encounter a problem with a. War package. If you use the JB development tool, needless to say, directly build a Web project, compiled to produce a. war file. Recently, in order to prepare for the NIT-PRO exam, I used my favorite Eclipse development tool, not directly provided. The War pack order, which worried me for a while. Now learn the use of this command, feel, every effort, knowledge is seen in the growth. Describes the use of. War packaging from the command line:

Under CMD, when we knock down the JAR-HELP, the system provides us with the following JAR commands and jar packaging:

Usage: jar {ctxui}[vfm0me] [jar-file] [manifest-file] [entry-
S...
Options include:
-C Create a new archive
-t lists the archive directory
-X uncompress archived specified (or all) files
-U Update Existing archive
-V generating verbose output in standard output
-F Specify archive file name
-M contains the manifest information in the specified manifest file
-e a standalone application bundled to an executable jar file
Specify application entry points
-0 storage only; Do not use any ZIP compression
-M does not create a manifest file for an entry
-I generates index information for the specified jar file
-C changes to the specified directory and contains the files in it
If there is any directory file, it is recursively processed.
Specified order of manifest file name, archive file name, and entry roll
The same order as the "M", "F" and "E" flags are specified.

Example 1: Archive two class files into an archive named Classes.jar:
Jar CVF Classes.jar Foo.class bar.class
Example 2: Use the existing manifest file "Mymanifest" and
Archive all files in the foo/directory to "Classes.jar":
Jar CVFM Classes.jar mymanifest-c foo/.

Now we use the Jar command for the war package:

Run cmd into the command prompt line, navigate to the project path, such as your project name is "classes" placed in the D disk to the path,

You'll be able to run to d:\classes

Then run jar CVF Classes.war * *. (Here's a point that contains all the files under this folder).

Then put the packaged files to%tomcat _home%webapps/classes.war (Classes.war is my package of engineering documents, replaced by your project packaging files)

Start Tomcat again, enter http://localhost:8080/classes in the Address bar (you may find that when you put your war bag in the WebApps directory, the page is refreshed automatically to the previous folder.) This is the function of the Tomcat server. )

Source: Learning Network (www.xue5.com), original address: http://www.xue5.com/itedu/200707/134317.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.