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

【JavaWeb】Tomcat_WebAPP的标准结构

在webapps目录下创建app目录


app目录下创建aaa.html

app目录下创建static目录,在static目录下创建如下三个目录


WEB-INF目录下的资源是受保护的资源,是不可以通过浏览器直接访问的资源

在app目录下创建WEB-INF目录
将图片放入该目录下,并在浏览器中访问,发现无法访问

将图片放在其他目录下,是可以访问的

在该目录下创建如下内容

web.xml文件内容如下:

<?xml version="1.0"encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation(ASF)under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License,Version 2.0(the"License");you may not use this file except in compliance with the License. You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing,software distributed under the License is distributed on an"AS IS"BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaeehttps://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd" version="6.0"metadata-complete="true"> </web-app>

总结

一个可以部署到tomcat/webapps中的,标准的app目录结构如下

或者

http://www.cnnetsun.cn/news/1429.html

相关文章:

  • 【JavaWeb】Tomcat10 常见目录
  • 【JavaWeb】Tomcat_部署项目方式
  • halcon刚性变换(平移+旋转)——vector_angle_to_rigid
  • 【机器学习金融模型】
  • 【异腾SGLang与vLLM-Ascend性能测评与调优指南】
  • 卷积神经网络
  • markdown没保存关机了 如何快速找回
  • 打破积分沉睡魔咒,我们的小程序让每一分都“活”起来
  • Spring Boot 复杂查询的代码:解耦动态查询模板与通用工具类
  • 第12篇:多模态大模型论文VISIONTRIM: UNIFIED VISION TOKEN COMPRESSIONFOR TRAINING-FREE MLLM ACCELERATION
  • No points are provided; please add points first
  • python 推送视频流
  • 实时 数字人 DH_live 半身
  • live2d 数字人
  • 电商视觉时代:如何用Dreamshop重构“人-货-场”?
  • CSS基础详解(2)--Grid网格布局详解
  • html css js网页制作成品——孟子义html+css5页附源码
  • 前端面试题
  • 中小企业如何选择iPaas系统集成平台
  • 深入浅出Vue 响应式原理:从Object.defineProperty 到 Proxy
  • Spring Boot 4.0 新特性整合 MyBatis-Plus 完整教程
  • Spring Cloud Alibaba 微服务整合自定义日志注解完整教程
  • Java占位符全览
  • IO流——解压缩流/压缩流
  • 项目知识——Monorepo(单体仓库)架构详解
  • 项目知识——API端点
  • 代码1:前端具体分析②
  • 基于SpringBoot+Vue的学生成绩综合评价方案的设计与实现
  • 基于SpringBoot+Vue的学生答题练习在线平台的设计与实现
  • 基于SpringBoot+Vue的在线文献检索系统的设计与实现