当前位置: 首页 > news >正文

Tomcat Notes: Deployment File

This is a personal study notes of Apache Tomcat. Below are main reference material.

- YouTube Apache Tomcat Full Tutorial,owed by Alpha Brains Courses. https://www.youtube.com/watch?v=rElJIPRw5iM&t=801s



  • 1、Tomcat deployment
    • 1.1、Two modes of deployment
    • 1.2、deployment file structure
      • 1.2.1、Static files
      • 1.2.2、WEB-INF
      • 1.2.3、META-INF
      • 1.2.4、Summary

1、Tomcat deployment

1.1、Two modes of deployment

We know all apps we want to deploy should be placed in webappsfolder. Assuming predsis the app in the following notes.

请添加图片描述
we can see it has predsand preds.war.

Actually predsis the unpacked version of preds.war. They have exactly same content.

it reveals that Tomcat support two modes of deployment:

  • packed: The entire app is packed in a war file, like preds.war.
  • unpacked: A normal folder, unpacked version of preds.war.

So you can have only one of them then execute startup.shor startup.batto get app deployed.


We usually choose packed file to deploy. It’s for portability: Packed file is only one file. It’s easy to copy or transfer unlike a directory to mess around with.



1.2、deployment file structure

1.2.1、Static files

Static files are like .html, .css, .jsp, .jsand so on.

They are under the fisrt level folder. In below example styles.cssand ajax.xhtmlare static files.
在这里插入图片描述

You can also create a subdirectory of your own to place static files. It’s very common like image files placed under preds.war/assets/images/.

1.2.2、WEB-INF

WEB-INFhas three types of files. They are configuration, complied files defined by developer and archived code.

  • Configuration files: Configuration file are under WEB-INF, like web.xmland faces-config.xmlin this example. Default configuration file is web.xml. You can configure web context, welcome page and so on in this file.

Compiled files defined by developers also are placed in WEB-INF, which are under classfolder.

In this example you can see complied .javafiles which are .classfiles are under classfolder.

请添加图片描述


1.2.3、META-INF

It only contains a file called MANIFEST.MFwhich is used to record meta data which is description of the whole .warfile like what the .warfile have and where those files are placed.

Basically it used to make sure everything is in the right place. Just know what is used for is ok.

1.2.4、Summary

在这里插入图片描述

http://www.lryc.cn/news/277532.html

相关文章:

  • 某邦通信股份有限公司IP网络对讲广播系统挖矿检测脚本
  • uniapp点击跳转传对象
  • 简单用PHP实现微信小程序的游戏功能
  • 某查查请求头参数加密分析(含JS加密算法与Python爬虫源码)
  • 免费用chatGPT
  • 还不会python 实现常用的数据编码和对称加密?看这篇文章就够啦~
  • 简易实现 MyBatis 底层机制
  • PhpPythonC++圆类的实现(OOP)
  • OpenSSL升级版本
  • 基于sprinmgboot实习管理系统源码和论文
  • 图像分类任务的可视化脚本,生成类别json字典文件
  • Adding Conditional Control to Text-to-Image Diffusion Models——【代码复现】
  • java-Exchanger详解
  • ‘再战千问:启程你的提升之旅‘,如何更好地提问?
  • java SSM社区文化服务管理系统myeclipse开发mysql数据库springMVC模式java编程计算机网页设计
  • go执行静态二进制文件和执行动态库文件
  • 通过示例解释序列化和反序列化-Java
  • k8s源码阅读环境配置
  • Java JDBC整合(概述,搭建,PreparedStatement和Statement,结果集处理)
  • Nginx 负载均衡集群 节点健康检查
  • uniapp 多轴图,双轴图,指定哪几个数据在哪个轴上显示
  • Kotlin 协程 supervisorScope {} 运行崩溃解决
  • 【Spring 篇】JdbcTemplate:轻松驾驭数据库的魔法工具
  • Web开发SpringBoot SpringMVC Spring的学习笔记(包含开发常用工具类)
  • 微服务下的SpringSecurity认证端
  • 苹果电脑菜单栏应用管理软件Bartender 4 mac软件特点
  • 笙默考试管理系统-MyExamTest----codemirror(65)
  • git在本地创建dev分支并和远程的dev分支关联起来
  • 【C++】深入了解构造函数之初始化列表
  • 差分--差分数组快速计算L到R值相加后的数组