代码拉取完成,页面将自动刷新
This example Java Web Application is based on this article: How to create a Web Application Project with Maven
It is developed in JDK 8 + Tomcat 9.0 on Windows. It is OK to run under Tomcat 7 and Tomcat 8.
Here are some developer notes.
# create the "CounterWebApp" web application.
mvn archetype:generate -DgroupId=com.example -DartifactId=CounterWebApp -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
# navigate to "CounterWebApp" folder.
cd CounterWebApp
# generate Eclipse web project files.
mvn eclipse:eclipse -Dwtpversion=2.0
Import the project into eclipse ID. Add and update the source files according to the article. It is now ready to run or debug in eclipse.
Or to test run using Maven.
# clean up, compile and perform unit test.
mvn clean compile test
# launch in Tomcat (v7.0.47) container.
mvn tomcat7:run
Access the web application via link: http://localhost:8080/CounterWebApp/
# build release file.
mvn package
# generate a site with reports.
mvn site
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。