Three deployment mode

1. Implicit deployment

  webapps directory

2. Explicit Mode

1) Host added a Context (specify the path and file address in server.xml)

In this case, not only is the folder, the file can not be deployed war, if war file, then, tomcat start unsuccessful

2) Create a xml file (hot deployment) in conf / Catalina / localhost, the access path to the file name

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/youy" docBase="C:/liyongsong/test/spring-mvc-1.0-SNAPSHOT" />

Note: The name of the path attribute, and file name to be the same.

 

Guess you like

Origin www.cnblogs.com/lys-lyy/p/11298985.html