Deploy the eclipse project to tomcat

1. Just in case, the local tomcat version and its jdk version should preferably be the same as the version on the server

2. Run the project under local eclipse to publish (note (1) whether the database is connected to the server database or the local database (2) clean the project before running the project, otherwise it will always report 404 when deployed, the reason is not clear, It is true)

3. You can see the folder where the published project is located in the eclipse console (for example, mine is in: Information: Command line argument: -Dwtp.deploy=E:\workspace\.metadata\.plugins\org.eclipse. wst.server.core\tmp1\wtpwebapps)

4. Send the published project folder to the specified folder on the server.

5. Configure in server.xmll

<Host name="域名" appBase="webapps" unpackWARs="true" autoDeploy="true">
<Context path="/" docBase="要部署的项目所在文件夹" reloadable="true"></Context>
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="日志目录" prefix="lzhpcnet_access_log" suffix=".txt" pattern="%h %l %u %t "%r" %s %b" />
</Host>

6. Restart the server

./shutdown.sh

./startup.sh

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325128356&siteId=291194637