1)安装

在此之前要安装 好jdk和jre

下载绿色版

http://tomcat.apache.org/

解压至:D:\Program Files (x86)\tomcat9

环境变更path添加两个值 :

7.Java web—tomcat9部署

新建一个系统变量:CLASSPATH,其值新增一项

7.Java web—tomcat9部署

cmd里执行安装服务:

安装: D:\Program Files (x86)\tomcat9\bin>service.bat install

删除服务:D:\Program Files (x86)\tomcat9\bin>service.bat uninstall

7.Java web—tomcat9部署

把服务设置成自动启动

 

2)配置

1.更改默认端口

配置文件server.xml里找到

7.Java web—tomcat9部署

2.把项目放在不同目录,不是放在tomcat的webapps目录配置

在server.xml的host节点添加

<Context path="/crm" docBase="E:/study/java/crm/WebContent"/>,使用htpp://localhost:8080/crm就可以访问到

3.配置默认文档

web.xml里找到相关下面代码

<welcome-file-list>
     <welcome-file>index.jsp</welcome-file>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
    </welcome-file-list>

相关文章:

  • 2021-12-10
  • 2021-07-23
  • 2021-09-08
  • 2021-10-24
  • 2021-07-27
  • 2022-03-04
  • 2022-12-23
  • 2021-07-12
猜你喜欢
  • 2022-12-23
  • 2021-09-21
  • 2021-10-09
  • 2022-12-23
  • 2022-01-11
  • 2021-08-11
  • 2022-01-18
相关资源
相似解决方案