Prerequisite: You want to match good Jdk,maven plug-in on the computer, into the DOS input mvn-version, you can come out of things.
1. Create a new MAVEN project in Eclipse, check out create a simple project (skip archetype Selectio)
2, right key items, select Java EE tools->generate Deployment descriptor Stub, this will be Src->webapp, the following generation of Web-inf directory
3, under the WebApp a new JSP page, first.jsp page, may be an error: the superclass "Javax.servlet.http.HttpServlet" is not found on the Java build Path
Right-click the project, choose Build Path, enter the Libraries tab, choose Add Library, select Server Runtimes,-> Choose the servers that you configured in Eclipse, and hit finish.
4, do not know where my eclipse configuration is not, can not be packaged with eclipse, the next is to manually package, find your project file directory, into the project folder,
5, enter the DOS system in this directory, (you can hold down SHIFT, right key to this directory blank, choose to open the Command window here), Input mvn clean package-u
6. You will find in the target folder that you just created the war package for the project,
Next, deploy to the JBoss or tomact container,
7, copy just get the war package, to your installation of the JBoss directory, to the Standalone->deplouments directory, Start the JBoss service (Standalone.bat), and you can see if there is more than one in this directory, the project name. War.deployed. File, if the (undeployed) description fails, there is an error in the above procedure.
8, open the browser, access to the server directory (http://localhost:8081/2-0.0.1-SNAPSHOT/first.jsp) My is 8081 port, everyone is not the same default is 8080, port,
Then how to deploy the war package to the Tomact container,
9, the war package just copied to your installation of the Tomact directory of the WebApp, it will automatically compile,
10, start the Tomact service (enter the bin directory, Startup.bat,), enter in the browser (http://localhost:8080/2-0.0.1-SNAPSHOT/first.jsp),
See if you're going to go to the page you just edited