tomcat

Introduction

Defination:

Apache Tomcat is a free and open-source implementation of the Jakarta Servlet, Jakarta Expression Language, and WebSocket technologies. Tomcat provides a "pure Java" HTTP web server environment in which Java code can run.


Apache Tomcat is the servlet container as well as a web server


配置和部署项目

  1. 修改启动端口号:conf/server.xml
<Connector
port="8080"protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"/>

  1. 端口号冲突:找到对应程序,将其关闭掉
at org.apache.catalina.startup.Bootstrap.load (Bootstrap.java
at org.apache.catalina.startup.Bootstrap.rain(Bootstrap.java
Caused by:java.net.BindException:Address already in use:bind
at sun.nio.ch.Net.bind0 (Native Method)
at sun.nio.ch.Net.bind (Net.java:433)
  1. 启动窗口一闪而过:检查JAVA_HOME环境变量是否正确配置

IDEA集成本地Tomcat

IDEA中使用Tomcat: