IDEA fight the war package to deploy local TOMCAT test

Playing war package is convenient Eclipse, to derive direct selection war package, as shown below:

But a bit of trouble in the IDEA, a lot of online tutorials, are also doing well, I also do a deepened about the impression.
First, open the File-> ProjectStructure-> Artifacts, explain here what is the Artifacts, it is the combination of resources your project can be a war package, or a bunch of files compiled classes + lib + html, etc., corresponding to is framed in the two following diagram, Exploded is as folders packed into Artifacts, Archive war in the form of packets packed into Artifacts, we choose Archive.
Here modify the project name, Output directory means that when you execute Build Artifacts instructions, resulting war package to be stored here.

Here we need to add in the resource file WebRoot, click the plus sign + Select Directory Content, select the project WebRoot directory.

Next select the right item, add an item in, click OK, here we are ready to create the Artifacts.

Click Build-> Build Artifacts created. War package is automatically generated in the above directory.

The following test is available in the local TOMCAT
Webapps directory to find a local TOMCAT
D:\Java\apache-tomcat-7.0.90\webapps
The packaged war package into them

Open the console, switch to the next TOMCATbin directory, start tomcat, open the browser test.

 

 

Guess you like

Origin www.cnblogs.com/Kingram/p/10966545.html
Recommended