War file Deployment (RPM)

Source: Internet
Author: User

In fact, the beginning of the requirement to compress the source code into a war file, confused!

Company projects require CAS SSO single sign-on

That's the thing ....

In fact, the war file is the packaging of Web applications in Java. To borrow a man's words, "When you have a lot of Web applications, if you want to deploy it to other machines, it's a pretty depressing thing to go back and forth, if it's a file ..." Then the war file will meet your little request. "

Then some people will say, this and directly into the RAR file is not the same? The difference is big!

If you directly into the RAR file, you have to manually unzip, but the war file does not need, you put it into the Tomcat WebApp directory, you can directly run, I think this work can be powerful, haha.

in the Tomcat installation directory under the Conf directory there is a server.xml, search "unpackwars" keyword, you will see in the <Host> tag will have its settings, if set to true, then tomcat at boot time, Automatically extracts your war file in the WebApps directory, and if set to False, Tomcat accesses the war file directly.

If his value is true, your tomcat has been started, you have automatically unpacked folder deleted, Tomcat will automatically unzip, I think it is real-time in the check, once there is no, it will decompress.

How do I generate a war file?

JAR-CVF Blog.war *

How to view the war file

JAR-TF Blog.war

In fact, in eclipse, the realization of such a function is also very simple

Create a new Web project:

Named: Eclipse4war (the name can be taken from any drop)

Items--Right-click

export--> WAR file

Start Tomcat

Go to the management interface of Tomcat: See the Red box section

Deployment success:

Visit Homepage:

Reference documents:

Http://www.cnblogs.com/hongten/archive/2012/11/27/hongten_java_eclipse_war_tomcat.html

Http://www.cnblogs.com/lan0725/archive/2010/01/20/1874009.html

Http://www.cnblogs.com/visec479/p/4523700.html

War file Deployment (RPM)

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.