[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"site-config":3,"primary-menu":6,"cat-tomcat":85,"catposts-tomcat":99,"post-detail-post-tomcat-deploy-e44a593c":208},{"config":4,"socialLinks":5},null,[],{"metadata":7,"spec":10,"menuItems":20},{"name":8,"creationTimestamp":9},"primary","2026-09-12T06:13:55.024154Z",{"displayName":11,"menuItems":12},"主菜单",[13,14,15,16,17,18,19],"88c3f10b-321c-4092-86a8-70db00251b74","menu-item-izrtmxer","c4c814d1-0c2c-456b-8c96-4864965fee94","menu-item-column","menu-item-tools","menu-item-zsxq","menu-item-ocrxlczu",[21,30,40,49,58,67,76],{"displayName":22,"metadata":23,"spec":25,"status":28,"children":29},"首页",{"name":13,"creationTimestamp":24},"2026-09-12T06:13:54.422830Z",{"displayName":22,"href":26,"priority":27,"menuName":8},"\u002F",0,{"displayName":22,"href":26},[],{"displayName":31,"metadata":32,"spec":34,"status":38,"children":39},"Java面试八股",{"name":14,"creationTimestamp":33},"2026-09-13T09:42:02.854891Z",{"displayName":31,"href":35,"target":36,"priority":37,"menuName":8},"\u002Fjava-interview","_self",1,{"displayName":31,"href":35},[],{"displayName":41,"metadata":42,"spec":44,"status":47,"children":48},"文章",{"name":15,"creationTimestamp":43},"2026-09-12T06:13:54.457307Z",{"displayName":41,"href":45,"priority":46,"menuName":8},"\u002Farchives",2,{"displayName":41,"href":45},[],{"displayName":50,"metadata":51,"spec":53,"status":56,"children":57},"项目实战",{"name":16,"creationTimestamp":52},"2026-09-14T00:35:08.138170Z",{"displayName":50,"href":54,"target":36,"priority":55,"menuName":8},"\u002Fcolumn",3,{"displayName":50,"href":54},[],{"displayName":59,"metadata":60,"spec":62,"status":65,"children":66},"在线工具",{"name":17,"creationTimestamp":61},"2026-09-14T00:35:08.171474Z",{"displayName":59,"href":63,"target":36,"priority":64,"menuName":8},"\u002Ftools",4,{"displayName":59,"href":63},[],{"displayName":68,"metadata":69,"spec":71,"status":74,"children":75},"知识星球",{"name":18,"creationTimestamp":70},"2026-09-14T00:35:08.199145Z",{"displayName":68,"href":72,"target":36,"priority":73,"menuName":8},"\u002Fzsxq",5,{"displayName":68,"href":72},[],{"displayName":77,"metadata":78,"spec":80,"status":83,"children":84},"特价云服务器",{"name":19,"creationTimestamp":79},"2026-09-25T15:30:59.201614Z",{"displayName":77,"href":81,"target":36,"priority":82,"menuName":8},"\u002Fserver",6,{"displayName":77,"href":81},[],{"metadata":86,"spec":91,"status":97,"postCount":73},{"name":87,"creationTimestamp":88,"labels":89},"tomcat","2026-09-13T09:13:25.759540Z",{"haloweb.section":90},"interview",{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},"Tomcat 面试题","","Tomcat 面试题：整体架构、类加载机制、连接器模型、线程池与性能调优。",10,false,{"permalink":98,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Ftomcat",[100,124,145,166,187],{"metadata":101,"spec":104,"status":113,"categories":118},{"name":102,"creationTimestamp":103},"post-tomcat-deploy-e44a593c","2026-09-13T10:01:10.611263Z",{"title":105,"slug":106,"cover":93,"excerpt":107,"publishTime":109,"categories":110,"tags":111,"priority":27,"pinned":96,"deleted":96,"visible":112,"allowComment":108},"Tomcat 的部署方式有哪些？","tomcat-deploy",{"raw":93,"autoGenerate":108},true,"2026-09-13T10:01:10.656984Z",[87],[],"PUBLIC",{"permalink":114,"excerpt":115,"lastModifyTime":116,"phase":117},"\u002Farchives\u002Ftomcat-deploy","一、WAR 包部署 把 WAR 放到 webapps 目录，Tomcat 自动解压部署。最常用。 二、目录部署 直接把解压后的应用目录放到 webapps，或通过 Context 配置指定路径。 三、Context 片段部署 在 conf\u002FCatalina\u002Flocalhost\u002F 下放 context","2026-09-16T09:15:15.246373Z","PUBLISHED",[119],{"metadata":120,"spec":122,"status":123,"postCount":73},{"name":87,"creationTimestamp":88,"labels":121},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":73,"visiblePostCount":73},{"metadata":125,"spec":128,"status":135,"categories":139},{"name":126,"creationTimestamp":127},"post-tomcat-valve-315956e1","2026-09-13T10:01:10.457861Z",{"title":129,"slug":130,"cover":93,"excerpt":131,"publishTime":132,"categories":133,"tags":134,"priority":27,"pinned":96,"deleted":96,"visible":112,"allowComment":108},"Tomcat 的 Valve 机制？","tomcat-valve",{"raw":93,"autoGenerate":108},"2026-09-13T10:01:10.502555Z",[87],[],{"permalink":136,"excerpt":137,"lastModifyTime":138,"phase":117},"\u002Farchives\u002Ftomcat-valve","一、定义 Valve（阀门）是 Tomcat 的拦截器机制，类似 Servlet Filter，但作用在容器层面（Engine\u002FHost\u002FContext）。 二、常用 Valve AccessLogValve：访问日志。 RemoteAddrValve：IP 黑白名单。 RemoteHostValv","2026-09-16T09:15:43.118472Z",[140],{"metadata":141,"spec":143,"status":144,"postCount":73},{"name":87,"creationTimestamp":88,"labels":142},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":73,"visiblePostCount":73},{"metadata":146,"spec":149,"status":156,"categories":160},{"name":147,"creationTimestamp":148},"post-tomcat-session-09e900f9","2026-09-13T10:01:10.279273Z",{"title":150,"slug":151,"cover":93,"excerpt":152,"publishTime":153,"categories":154,"tags":155,"priority":27,"pinned":96,"deleted":96,"visible":112,"allowComment":108},"Tomcat 的 Session 管理？","tomcat-session",{"raw":93,"autoGenerate":108},"2026-09-13T10:01:10.325830Z",[87],[],{"permalink":157,"excerpt":158,"lastModifyTime":159,"phase":117},"\u002Farchives\u002Ftomcat-session","一、Session 实现 Tomcat 用 StandardSession 实现 HttpSession，存在内存中，由 Manager 管理。 二、持久化 StandardManager：Tomcat 关闭时序列化 Session 到 SESSIONS.ser，启动时恢复。 PersistentM","2026-09-16T09:15:42.675401Z",[161],{"metadata":162,"spec":164,"status":165,"postCount":73},{"name":87,"creationTimestamp":88,"labels":163},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":73,"visiblePostCount":73},{"metadata":167,"spec":170,"status":177,"categories":181},{"name":168,"creationTimestamp":169},"post-tomcat-connector-1a9adcb4","2026-09-13T10:01:09.986554Z",{"title":171,"slug":172,"cover":93,"excerpt":173,"publishTime":174,"categories":175,"tags":176,"priority":27,"pinned":96,"deleted":96,"visible":112,"allowComment":108},"Tomcat Connector 的工作模式？","tomcat-connector",{"raw":93,"autoGenerate":108},"2026-09-13T10:01:10.148457Z",[87],[],{"permalink":178,"excerpt":179,"lastModifyTime":180,"phase":117},"\u002Farchives\u002Ftomcat-connector","一、三种运行模式 BIO：阻塞 IO，每个请求一个线程，Tomcat 7 前默认。 NIO：非阻塞 IO，基于 Java NIO，Tomcat 8 默认。 APR：基于 Apache Portable Runtime，原生 C 库，性能最好。 二、NIO 模式 一个 Acceptor 线程接收连接。","2026-09-16T09:15:39.756354Z",[182],{"metadata":183,"spec":185,"status":186,"postCount":73},{"name":87,"creationTimestamp":88,"labels":184},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":73,"visiblePostCount":73},{"metadata":188,"spec":191,"status":198,"categories":202},{"name":189,"creationTimestamp":190},"post-tomcat-architecture-069d50f9","2026-09-13T10:01:09.794498Z",{"title":192,"slug":193,"cover":93,"excerpt":194,"publishTime":195,"categories":196,"tags":197,"priority":27,"pinned":96,"deleted":96,"visible":112,"allowComment":108},"Tomcat 的整体架构？","tomcat-architecture",{"raw":93,"autoGenerate":108},"2026-09-13T10:01:09.841985Z",[87],[],{"permalink":199,"excerpt":200,"lastModifyTime":201,"phase":117},"\u002Farchives\u002Ftomcat-architecture","一、核心组件 Server：Tomcat 顶层容器，管理 Service 生命周期。 Service：包含 Connector 和 Engine，一个 Tomcat 可有多个 Service。 Connector：连接器，监听端口，接收请求并转换为 Request，如 HTTP\u002F1.1、AJP。 E","2026-09-16T09:15:41.748689Z",[203],{"metadata":204,"spec":206,"status":207,"postCount":73},{"name":87,"creationTimestamp":88,"labels":205},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":73,"visiblePostCount":73},{"metadata":209,"spec":210,"status":214,"categories":215,"content":221},{"name":102,"creationTimestamp":103},{"title":105,"slug":106,"cover":93,"excerpt":211,"publishTime":109,"categories":212,"tags":213,"priority":27,"pinned":96,"deleted":96,"visible":112,"allowComment":108},{"raw":93,"autoGenerate":108},[87],[],{"permalink":114,"excerpt":115,"lastModifyTime":116,"phase":117},[216],{"metadata":217,"spec":219,"status":220,"postCount":73},{"name":87,"creationTimestamp":88,"labels":218},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":95,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":98,"postCount":73,"visiblePostCount":73},{"content":222,"raw":222},"\u003Ch2>一、WAR 包部署\u003C\u002Fh2>\n\u003Cp>把 WAR 放到 webapps 目录，Tomcat 自动解压部署。最常用。\u003C\u002Fp>\n\u003Ch2>二、目录部署\u003C\u002Fh2>\n\u003Cp>直接把解压后的应用目录放到 webapps，或通过 Context 配置指定路径。\u003C\u002Fp>\n\u003Ch2>三、Context 片段部署\u003C\u002Fh2>\n\u003Cp>在 conf\u002FCatalina\u002Flocalhost\u002F 下放 context.xml，指定 docBase。\u003C\u002Fp>\n\u003Ch2>四、Manager 应用\u003C\u002Fh2>\n\u003Cp>通过 Tomcat 自带的 Manager 应用（\u002Fmanager\u002Fhtml）远程部署，需配置用户。\u003C\u002Fp>\n\u003Ch2>五、嵌入式 Tomcat\u003C\u002Fh2>\n\u003Cp>Spring Boot 默认用嵌入式 Tomcat，无需单独安装，打成 jar 直接运行。\u003C\u002Fp>\n\u003Ch2>六、注意\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>生产环境建议关掉 Manager 应用或限制访问。\u003C\u002Fli>\n\u003Cli>热部署可能导致内存泄漏（类加载器无法回收）。\u003C\u002Fli>\n\u003C\u002Ful>"]