tomcat root war
1.0.2
root.war替換Tomcat的默認根應用程序-UNG TOMCAT_HOME/webApps/root
SDKMAN
安裝和使用JDK 18
sdk install java 18.0.2-tem
sdk use java 18.0.2-temApache Maven
安裝Apache Maven 3.9.9
sdk install maven 3.9.9
sdk use maven 3.9.9git
git clone [email protected]:AndriyKalashnykov/tomcat-root-war.git
cd tomcat-root-war
mvn clean package jetty:run
xdg-open http://localhost:8080/index.html訪問http:// localhost:8080/index.html或查看tomcat root war Web應用程序UI
git clone [email protected]:AndriyKalashnykov/tomcat-root-war.git
cd tomcat-root-war
mvn clean installmvn clean install -Daether.connector.https.securityMode=insecure -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=truejar tf ./target/ROOT.war編輯$TOMCAT_HOME/conf/server.xml : autoDeploy和deployOnStartUp需要設置為false
< Host name = " localhost " appBase = " webapps " unpackWARs = " true " autoDeploy = " false " deployOnStartUp = " false " >刪除默認的根文件夾並複制root.war
rm -rf $TOMCAT_HOME /webapps/ROOT/
rm -f $TOMCAT_HOME /webapps/ROOT.war
cp ./target/ROOT.war $TOMCAT_HOME /webapps/ROOT.war默認歡迎頁面-http:// localhost:8080/ 
JSP -http:// localhost:8080/index.jsp
servlet -http:// localhost:8080/infoservlet
html -http:// localhost:8080/index.html