1 Star 0 Fork 0

GC.R / test5

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
README.md 1.24 KB
一键复制 编辑 原始数据 按行查看 历史
test5 提交于 2024-04-29 16:51 . demo5

Counter Web Application

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.

  1. Create the web application.
# 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
  1. 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.

  2. 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/

  1. Build release package, and generate static website with reports.
# build release file.
mvn package

# generate a site with reports.
mvn site
1
https://gitee.com/gc-r/test5.git
git@gitee.com:gc-r/test5.git
gc-r
test5
test5
master

搜索帮助